diff toys/cat.c @ 281:1c160cadf5b9

Thinko in cat.
author Rob Landley <rob@landley.net>
date Wed, 09 Apr 2008 00:22:04 -0500
parents 0ca2fcee572b
children d1ae502ee190
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);
 	}
 }