changeset 281:1c160cadf5b9

Thinko in cat.
author Rob Landley <rob@landley.net>
date Wed, 09 Apr 2008 00:22:04 -0500
parents d1a548bbd0dd
children a08f1affe016
files toys/cat.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/toys/cat.c	Tue Apr 08 22:59:18 2008 -0500
+++ b/toys/cat.c	Wed Apr 09 00:22:04 2008 -0500
@@ -28,7 +28,7 @@
 		len = xread(fd, toybuf, size);
 		if (len<0) toys.exitval = EXIT_FAILURE;
 		if (len<1) break;
-		xwrite(1, toybuf, size);
+		xwrite(1, toybuf, len);
 	}
 }