git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51542
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
if ( !bStr )
return wxString();
if ( !bStr )
return wxString();
+ const int len = SysStringLen(bStr);
+
+ wxString str(bStr, len);
- const int len = SysStringLen(bStr) + 1;
if ( !::WideCharToMultiByte(CP_ACP, 0 /* no flags */,
if ( !::WideCharToMultiByte(CP_ACP, 0 /* no flags */,
+ bStr, len + 1 /* include last NUL */,
wxStringBuffer(str, len), len,
NULL, NULL /* no default char */) )
{
str.clear();
}
#endif
wxStringBuffer(str, len), len,
NULL, NULL /* no default char */) )
{
str.clear();
}
#endif