we need to pass szLocale allocated by strdup() and not retloc itself to setlocale()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37723 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
70ad0e06f0
commit
b7e1957a67
@ -1802,7 +1802,7 @@ bool wxLocale::Init(int language, int flags)
|
|||||||
|
|
||||||
#ifndef WX_NO_LOCALE_SUPPORT
|
#ifndef WX_NO_LOCALE_SUPPORT
|
||||||
wxChar *szLocale = retloc ? wxStrdup(retloc) : NULL;
|
wxChar *szLocale = retloc ? wxStrdup(retloc) : NULL;
|
||||||
bool ret = Init(name, canonical, retloc,
|
bool ret = Init(name, canonical, szLocale,
|
||||||
(flags & wxLOCALE_LOAD_DEFAULT) != 0,
|
(flags & wxLOCALE_LOAD_DEFAULT) != 0,
|
||||||
(flags & wxLOCALE_CONV_ENCODING) != 0);
|
(flags & wxLOCALE_CONV_ENCODING) != 0);
|
||||||
free(szLocale);
|
free(szLocale);
|
||||||
@ -1811,7 +1811,7 @@ bool wxLocale::Init(int language, int flags)
|
|||||||
m_language = lang;
|
m_language = lang;
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
#endif
|
#endif // !WX_NO_LOCALE_SUPPORT
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user