---
 toys/posix/head.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/toys/posix/head.c b/toys/posix/head.c
index 42f945b..8e77b01 100644
--- a/toys/posix/head.c
+++ b/toys/posix/head.c
@@ -56,6 +56,7 @@ void head_main(void)
   if (arg && *arg == '-' && arg[1]) {
     TT.lines = atolx(arg+1);
     toys.optc--;
+    toys.optargs++;
   }
-  loopfiles(toys.optargs+!!arg, do_head);
+  loopfiles(toys.optargs, do_head);
 }
-- 
2.0.5
_______________________________________________
Toybox mailing list
[email protected]
http://lists.landley.net/listinfo.cgi/toybox-landley.net

Reply via email to