]> git.saurik.com Git - wxWidgets.git/commitdiff
fix handling of locale names without county info (closes #10321)
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 11 Jan 2009 01:04:43 +0000 (01:04 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 11 Jan 2009 01:04:43 +0000 (01:04 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58012 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/intl.cpp

index 0fd36d04d9888ebff956d59233044343ead0a088..0dc780ac3182bdef22185f0b6cc13cf78635438c 100644 (file)
@@ -1198,7 +1198,7 @@ bool wxMsgCatalogFile::Load(const wxString& szDirPrefix, const wxString& szName,
 
 
     searchPath += GetFullSearchPath(szDirPrefix);
-    if ( szDirPrefix[LEN_LANG] == wxS('_') )
+    if ( szDirPrefix.length() > LEN_LANG && szDirPrefix[LEN_LANG] == wxS('_') )
     {
         // also add just base locale name: for things like "fr_BE" (Belgium
         // French) we should use fall back on plain "fr" if no Belgium-specific