X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/574c939ef1c1b835a8bc65c0fe724548fa04ec49..7e48d7d9fb4b546e6a68239e8a77ce7ef79df3b0:/src/xrc/xml.cpp 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);