From: Václav Slavík Date: Wed, 3 Jul 2002 09:49:03 +0000 (+0000) Subject: fixed a Really Stupid Bug X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/698052d5f125427b4ac62e1968a090f697aea8ae fixed a Really Stupid Bug git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16014 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/contrib/src/xrc/xml.cpp b/contrib/src/xrc/xml.cpp index 32ee02a04b..a1c6a01796 100644 --- a/contrib/src/xrc/xml.cpp +++ b/contrib/src/xrc/xml.cpp @@ -353,8 +353,9 @@ inline static wxString CharToString(wxMBConv *conv, wchar_t *buf = new wchar_t[nLen+1]; wxConvUTF8.MB2WC(buf, s, nLen); buf[nLen] = 0; + wxString s(buf, *conv, len); delete[] buf; - return wxString(buf, *conv, len); + return s; } else return wxString(s, len); diff --git a/src/xrc/xml.cpp b/src/xrc/xml.cpp index 32ee02a04b..a1c6a01796 100644 --- a/src/xrc/xml.cpp +++ b/src/xrc/xml.cpp @@ -353,8 +353,9 @@ inline static wxString CharToString(wxMBConv *conv, wchar_t *buf = new wchar_t[nLen+1]; wxConvUTF8.MB2WC(buf, s, nLen); buf[nLen] = 0; + wxString s(buf, *conv, len); delete[] buf; - return wxString(buf, *conv, len); + return s; } else return wxString(s, len);