]> git.saurik.com Git - wxWidgets.git/commitdiff
Pass length including the null-terminator to cWC2MB
authorRobin Dunn <robin@alldunn.com>
Wed, 5 Sep 2007 22:53:29 +0000 (22:53 +0000)
committerRobin Dunn <robin@alldunn.com>
Wed, 5 Sep 2007 22:53:29 +0000 (22:53 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48579 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/string.cpp

index a791562d7e25fd40ebda91a5289debf9bc56c8b2..02cb02a0baec6b5f441647817cd196df623fde28 100644 (file)
@@ -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