]> git.saurik.com Git - wxWidgets.git/commitdiff
corrected off by 1 error in cMB2WC() call (thanks valgrind)
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 24 Jul 2007 00:36:22 +0000 (00:36 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 24 Jul 2007 00:36:22 +0000 (00:36 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47691 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/fileconf.cpp

index 6b1f5f5df2a48b454ddaae3d7d9169169c3c0846..635c18a6ac516a417561b8fca372ebe23e780744 100644 (file)
@@ -458,7 +458,7 @@ wxFileConfig::wxFileConfig(wxInputStream &inStream, const wxMBConv& conv)
 
 #if wxUSE_UNICODE
     size_t len;
 
 #if wxUSE_UNICODE
     size_t len;
-    cbuf = conv.cMB2WC((char *)buf.GetData(), buf.GetDataLen(), &len);
+    cbuf = conv.cMB2WC((char *)buf.GetData(), buf.GetDataLen() + 1, &len);
     if ( !len && buf.GetDataLen() )
     {
         wxLogError(_("Failed to read config options."));
     if ( !len && buf.GetDataLen() )
     {
         wxLogError(_("Failed to read config options."));