From 4cb21a7b741b9ae7f9e6df43b53d8cf77376c312 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 11 Jan 2009 01:04:43 +0000 Subject: [PATCH] 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 --- src/common/intl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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