aboutsummaryrefslogtreecommitdiff
path: root/toys/posix
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2015-03-29 12:01:30 -0500
committerRob Landley <rob@landley.net>2015-03-29 12:01:30 -0500
commit857912ee354ae0c94ce18a99f7c7dd32b8169b87 (patch)
tree0f277b5e78e2886b61f48f03cef2169cc9fe0d6c /toys/posix
parenta64e35b336dbca32aa16228b09670ff8f83029d2 (diff)
downloadtoybox-857912ee354ae0c94ce18a99f7c7dd32b8169b87.tar.gz
Fix head bug pointed out by felix janda (recent -123 code broke first file argument of -n).
Diffstat (limited to 'toys/posix')
-rw-r--r--toys/posix/head.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/posix/head.c b/toys/posix/head.c
index 42f945bf..9312528a 100644
--- a/toys/posix/head.c
+++ b/toys/posix/head.c
@@ -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);
}