From f75387850b9672481d4d449403d973d92a8d3675 Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Tue, 5 Dec 2017 11:29:38 -0800 Subject: [PATCH] Fix reading wide character data in wxFile::ReadAll() See #16490 --- src/common/file.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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;