From: Robin Dunn Date: Wed, 5 Sep 2007 22:53:29 +0000 (+0000) Subject: Pass length including the null-terminator to cWC2MB X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/4f696af8d6901707449302763ab06dc970a15a78 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 --- diff --git a/src/common/string.cpp b/src/common/string.cpp index a791562d7e..02cb02a0ba 100644 --- a/src/common/string.cpp +++ b/src/common/string.cpp @@ -407,7 +407,7 @@ const wxCharBuffer wxString::mb_str(const wxMBConv& conv) const if ( !wcLen ) return wxCharBuffer(""); - return conv.cWC2MB(wcBuf, wcLen, NULL); + return conv.cWC2MB(wcBuf, wcLen+1, NULL); } #else // ANSI