diff --git a/src/common/file.cpp b/src/common/file.cpp index c346a30333..9da9aba608 100644 --- a/src/common/file.cpp +++ b/src/common/file.cpp @@ -281,9 +281,7 @@ bool wxFile::ReadAll(wxString *str, const wxMBConv& conv) length -= nread; } - *p = 0; - - wxString strTmp(buf, conv); + wxString strTmp(buf, conv, length); str->swap(strTmp); return true;