]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed a Really Stupid Bug
authorVáclav Slavík <vslavik@fastmail.fm>
Wed, 3 Jul 2002 09:49:03 +0000 (09:49 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Wed, 3 Jul 2002 09:49:03 +0000 (09:49 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16014 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

contrib/src/xrc/xml.cpp
src/xrc/xml.cpp

index 32ee02a04b11f08f660468273f63caef805c8310..a1c6a01796dcc8c1f13f3fcb0f758d24c6df6dea 100644 (file)
@@ -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);
index 32ee02a04b11f08f660468273f63caef805c8310..a1c6a01796dcc8c1f13f3fcb0f758d24c6df6dea 100644 (file)
@@ -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);