Fix code reading from the pipe stream in exec sample.

We must be reading bytes, not (wide) characters.

Closes #13290.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68036 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2011-06-24 13:10:23 +00:00
parent 175b0dbe82
commit 630d8c1998

View File

@@ -1470,8 +1470,8 @@ void MyPipeFrame::DoGetFromStream(wxTextCtrl *text, wxInputStream& in)
{ {
while ( in.CanRead() ) while ( in.CanRead() )
{ {
wxChar buffer[4096]; char buffer[4096];
buffer[in.Read(buffer, WXSIZEOF(buffer) - 1).LastRead()] = wxT('\0'); buffer[in.Read(buffer, WXSIZEOF(buffer) - 1).LastRead()] = '\0';
text->AppendText(buffer); text->AppendText(buffer);
} }