Commit ba96f5e2 authored by Christophe Mutricy's avatar Christophe Mutricy

Fix memory corruption in wx locales handling on UTF8 system with iconv

parent 21b9dcdc
......@@ -91,7 +91,7 @@ DECLARE_LOCAL_EVENT_TYPE( wxEVT_INTF, 1 );
* a wxString.
*
* Note that if you want to use non-ANSI code page characters on Windows,
* you MUST build WxWidgets in “Unicode” mode.
* you MUST build WxWidgets in “Unicode” mode. wxConvUTF8
*/
static inline char *wxFromLocale (const wxString& string)
{
......@@ -100,8 +100,8 @@ static inline char *wxFromLocale (const wxString& string)
return FromWide ((const wchar_t *)string.c_str());
# define wxLocaleFree free
# else
return FromLocale (string.mb_str());
# define wxLocaleFree LocaleFree
return FromLocaleDup (string.mb_str());
# define wxLocaleFree free
# endif
#else
# warning Please use WxWidgets with Unicode.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment