diff options
Diffstat (limited to 'src/Exec.cpp')
-rw-r--r-- | src/Exec.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Exec.cpp b/src/Exec.cpp index 659d812..a183ed2 100644 --- a/src/Exec.cpp +++ b/src/Exec.cpp @@ -19,9 +19,9 @@ namespace sibs while(!feof(pipe)) { - int bytesRead = fgets(buffer, BUFSIZE, pipe); - if(bytesRead > 0) + if(fgets(buffer, BUFSIZE, pipe)) { + int bytesRead = strlen(buffer); execStdout.append(buffer, bytesRead); if(print) printf("%.*s", bytesRead, buffer); |