From: Vadim Zeitlin Date: Sun, 11 Jan 2009 01:04:43 +0000 (+0000) Subject: fix handling of locale names without county info (closes #10321) X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/4cb21a7b741b9ae7f9e6df43b53d8cf77376c312 fix handling of locale names without county info (closes #10321) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58012 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/intl.cpp b/src/common/intl.cpp index 0fd36d04d9..0dc780ac31 100644 --- a/src/common/intl.cpp +++ b/src/common/intl.cpp @@ -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