fixed a Really Stupid Bug

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16014 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík 2002-07-03 09:49:03 +00:00
parent df26c4c640
commit 698052d5f1
2 changed files with 4 additions and 2 deletions

View 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);

View 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);