Fix restoring locale in wxCmdLineParser::SetArguments().

We need to call setlocale(NULL) to query the current locale, setlocale("")
returns the newly set locale and not the original one.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77542 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2014-09-05 00:36:26 +00:00
parent 4752322151
commit 3d61720298

View File

@@ -278,7 +278,8 @@ void wxCmdLineParserData::SetArguments(int argc, char **argv)
// temporarily change the locale here. The only drawback is that changing
// the locale is thread-unsafe but precisely because we're called so early
// it's hopefully safe to assume that no other threads had been created yet.
char * const locOld = SetAllLocaleFacets("");
char * const locOld = SetAllLocaleFacets(NULL);
SetAllLocaleFacets("");
wxON_BLOCK_EXIT1( SetAllLocaleFacets, locOld );
for ( int n = 0; n < argc; n++ )