]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/sstream.cpp
1. added wxEvtHandler::SafelyProcessEvent() and wxWindow::HandleWindowEvent() to...
[wxWidgets.git] / src / common / sstream.cpp
index 7d276e665be2a3c2343632d89f262666f304536d..aabe01e977646ca3a7f715467933458a1bea3cf3 100644 (file)
@@ -167,13 +167,14 @@ size_t wxStringOutputStream::OnSysWrite(const void *buffer, size_t size)
         srcLen = size;
     }
 
-    wxWCharBuffer wbuf(m_conv.cMB2WC(src, srcLen, NULL /* out len */));
+    size_t wlen;
+    wxWCharBuffer wbuf(m_conv.cMB2WC(src, srcLen, &wlen));
     if ( wbuf )
     {
         // conversion succeeded, clear the unconverted buffer
         m_unconv = wxMemoryBuffer(0);
 
-        *m_str += wbuf;
+        m_str->append(wbuf, wlen);
     }
     else // conversion failed
     {