]> git.saurik.com Git - wxWidgets.git/commitdiff
really fixed number of bytes written in WriteString() in Unicode mode
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 5 Apr 2006 23:19:09 +0000 (23:19 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 5 Apr 2006 23:19:09 +0000 (23:19 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38587 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/txtstrm.cpp

index 299a97cf29c4baec5499d83b23ea855d206ee6e4..20b583604cbc66d483559b090cecd5302973f5a7 100644 (file)
@@ -415,9 +415,8 @@ void wxTextOutputStream::WriteString(const wxString& string)
     }
 
 #if wxUSE_UNICODE
-    // note that we must not write the trailing NUL here
     wxCharBuffer buffer = m_conv->cWC2MB(out, out.length(), &len);
-    m_output.Write(buffer, len + 1 - m_conv->GetMBNulLen());
+    m_output.Write(buffer, len);
 #else
     m_output.Write(out.c_str(), out.length() );
 #endif