aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/exec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/exec.c b/examples/exec.c
index eed75863..e2c2cd12 100644
--- a/examples/exec.c
+++ b/examples/exec.c
@@ -36,7 +36,7 @@ int main(void) {
}
- while ((rc = channel_read(channel, buffer, sizeof(buffer), 0)) >= 0) {
+ while ((rc = channel_read(channel, buffer, sizeof(buffer), 0)) > 0) {
fwrite(buffer, 1, rc, stdout);
}