X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8650108199bf799f21e29811cddaefd579c98c88..0bbe61b8c18a1795189f0cf73cc61c14a0fb846d:/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 {