X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8650108199bf799f21e29811cddaefd579c98c88..949750de631b2c2ee59c6e9080e7d38fa66c0167:/src/common/sstream.cpp diff --git a/src/common/sstream.cpp b/src/common/sstream.cpp index 7d276e665b..aabe01e977 100644 --- a/src/common/sstream.cpp +++ b/src/common/sstream.cpp @@ -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 {