Fix reading wide character data in wxFile::ReadAll()

See #16490
This commit is contained in:
Paul Cornett 2017-12-05 11:29:38 -08:00
parent 696a5ba3dd
commit f75387850b

View File

@ -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;