]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix code reading from the pipe stream in exec sample.
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 24 Jun 2011 13:10:23 +0000 (13:10 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 24 Jun 2011 13:10:23 +0000 (13:10 +0000)
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

samples/exec/exec.cpp

index 586b129719d0c11d1ebd7b4d18d58a8c750025f4..07aa3b0b3efc86b761d88eb9eb59196b4864baa5 100644 (file)
@@ -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);
     }