aboutsummaryrefslogtreecommitdiff
path: root/toys
diff options
context:
space:
mode:
Diffstat (limited to 'toys')
-rw-r--r--toys/count.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/count.c b/toys/count.c
index 96102e4e..acc0c69f 100644
--- a/toys/count.c
+++ b/toys/count.c
@@ -28,7 +28,7 @@ void count_main(void)
len = xread(0, toybuf, sizeof(toybuf));
if (!len) break;
size += len;
- xwrite(1, toybuf, sizeof(toybuf));
+ xwrite(1, toybuf, len);
fdprintf(2, "%"PRIu64" bytes\r", size);
}
fdprintf(2,"\n");