X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0e32fdb872d413f14da8ce045766f0e2f13e202d..a4a6984d5e2d8ae424cc8f31c223304b260d7670:/src/common/intl.cpp?ds=sidebyside diff --git a/src/common/intl.cpp b/src/common/intl.cpp index 5e03cbdc18..12beb715c7 100644 --- a/src/common/intl.cpp +++ b/src/common/intl.cpp @@ -615,7 +615,12 @@ bool wxLocale::Init(const wxChar *szName, if ( m_strShort.IsEmpty() ) { // FIXME I don't know how these 2 letter abbreviations are formed, // this wild guess is surely wrong - m_strShort = tolower(szLocale[0]) + tolower(szLocale[1]); + if ( szLocale[0] ) + { + m_strShort += (wxChar)wxTolower(szLocale[0]); + if ( szLocale[1] ) + m_strShort += (wxChar)wxTolower(szLocale[1]); + } } // save the old locale to be able to restore it later