Fix head bug pointed out by felix janda (recent -123 code broke first file argument...
authorRob Landley <rob@landley.net>
Sun, 29 Mar 2015 17:01:30 +0000 (12:01 -0500)
committerRob Landley <rob@landley.net>
Sun, 29 Mar 2015 17:01:30 +0000 (12:01 -0500)
toys/posix/head.c

index 42f945b..9312528 100644 (file)
@@ -56,6 +56,6 @@ void head_main(void)
   if (arg && *arg == '-' && arg[1]) {
     TT.lines = atolx(arg+1);
     toys.optc--;
-  }
+  } else arg = 0;
   loopfiles(toys.optargs+!!arg, do_head);
 }