Pass length including the null-terminator to cWC2MB

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48579 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2007-09-05 22:53:29 +00:00
parent fa034c4511
commit 4f696af8d6

View File

@@ -407,7 +407,7 @@ const wxCharBuffer wxString::mb_str(const wxMBConv& conv) const
if ( !wcLen ) if ( !wcLen )
return wxCharBuffer(""); return wxCharBuffer("");
return conv.cWC2MB(wcBuf, wcLen, NULL); return conv.cWC2MB(wcBuf, wcLen+1, NULL);
} }
#else // ANSI #else // ANSI