X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fae05df5a988883e9c6683ccded766dfb7b84b1b..c49245f8baabd69afd7302c43474d3bdd247fb89:/src/common/datstrm.cpp diff --git a/src/common/datstrm.cpp b/src/common/datstrm.cpp index a13eb8cd3a..85f80d9507 100644 --- a/src/common/datstrm.cpp +++ b/src/common/datstrm.cpp @@ -194,8 +194,9 @@ void wxDataOutputStream::Write8(wxUint8 i) void wxDataOutputStream::WriteString(const wxString& string) { + const wxWX2MBbuf buf = string.mb_str(); Write32(string.Length()); - m_output->Write((const wxChar *) string, string.Length()*sizeof(wxChar)); + m_output->Write(buf, string.Len()); } // Must be at global scope for VC++ 5