Fixes for wxLocale::Init and Borland C++

Backported from head


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20017 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2003-04-06 15:08:12 +00:00
parent 9e1c4c0ab4
commit c9cdb51104
2 changed files with 8 additions and 4 deletions

View File

@@ -768,9 +768,13 @@ bool wxLocale::Init(int language, int flags)
#endif
#ifndef WX_NO_LOCALE_SUPPORT
return Init(name, canonical, retloc,
(flags & wxLOCALE_LOAD_DEFAULT) != 0,
(flags & wxLOCALE_CONV_ENCODING) != 0);
wxChar *szLocale = retloc ? wxStrdup(retloc) : NULL;
bool ret = Init(name, canonical, retloc,
(flags & wxLOCALE_LOAD_DEFAULT) != 0,
(flags & wxLOCALE_CONV_ENCODING) != 0);
if (szLocale)
free(szLocale);
return ret;
#endif
}