From: Vadim Zeitlin Date: Fri, 24 Jun 2011 13:10:23 +0000 (+0000) Subject: Fix code reading from the pipe stream in exec sample. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/630d8c1998a3555941c9a6bf6f41f6491b46adc8?hp=175b0dbe8252c72e06fac90e8232f7ad4f40eb85 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 --- diff --git a/samples/exec/exec.cpp b/samples/exec/exec.cpp index 586b129719..07aa3b0b3e 100644 --- a/samples/exec/exec.cpp +++ b/samples/exec/exec.cpp @@ -1470,8 +1470,8 @@ void MyPipeFrame::DoGetFromStream(wxTextCtrl *text, wxInputStream& in) { while ( in.CanRead() ) { - wxChar buffer[4096]; - buffer[in.Read(buffer, WXSIZEOF(buffer) - 1).LastRead()] = wxT('\0'); + char buffer[4096]; + buffer[in.Read(buffer, WXSIZEOF(buffer) - 1).LastRead()] = '\0'; text->AppendText(buffer); }