Fix giant glaring thinko.
authorRob Landley <rob@landley.net>
Thu, 28 Aug 2008 22:32:05 +0000 (17:32 -0500)
committerRob Landley <rob@landley.net>
Thu, 28 Aug 2008 22:32:05 +0000 (17:32 -0500)
toys/count.c

index 96102e4..acc0c69 100644 (file)
@@ -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");