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