changeset 1769:28806689547b draft

Fix head bug pointed out by felix janda (recent -123 code broke first file argument of -n).
author Rob Landley <rob@landley.net>
date Sun, 29 Mar 2015 12:01:30 -0500
parents 4c92484c2646
children ebc947f27ef3
files toys/posix/head.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/toys/posix/head.c	Sat Mar 28 20:21:03 2015 -0500
+++ b/toys/posix/head.c	Sun Mar 29 12:01:30 2015 -0500
@@ -56,6 +56,6 @@
   if (arg && *arg == '-' && arg[1]) {
     TT.lines = atolx(arg+1);
     toys.optc--;
-  }
+  } else arg = 0;
   loopfiles(toys.optargs+!!arg, do_head);
 }