From 857912ee354ae0c94ce18a99f7c7dd32b8169b87 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sun, 29 Mar 2015 12:01:30 -0500 Subject: Fix head bug pointed out by felix janda (recent -123 code broke first file argument of -n). --- toys/posix/head.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'toys/posix/head.c') 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); } -- cgit v1.2.3