aboutsummaryrefslogtreecommitdiff
path: root/src/Exec.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2018-09-26 01:52:50 +0200
committerdec05eba <dec05eba@protonmail.com>2020-07-06 07:39:33 +0200
commit527179c68597b907dbd6bdc6489181306e9e19ec (patch)
tree7b90b284b1927edc22b080da7ffe7e5b3620b466 /src/Exec.cpp
parent2bbcfbf4014d332121c65d7480a42556f02d00bc (diff)
Fix build for linux
Diffstat (limited to 'src/Exec.cpp')
-rw-r--r--src/Exec.cpp4
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);