From 698052d5f125427b4ac62e1968a090f697aea8ae Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Wed, 3 Jul 2002 09:49:03 +0000 Subject: [PATCH] fixed a Really Stupid Bug git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16014 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- contrib/src/xrc/xml.cpp | 3 ++- src/xrc/xml.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) 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); -- 2.50.0