From 52ab00b60863baf995522da1a638df4d6e9b0e8b Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Tue, 1 Apr 2014 18:18:46 -0500 Subject: bugfix: the multiplexer increments optc and then the command the multiplexer runs increments it further, resulting in a wrong count. Fix: zero it. --- main.c | 1 + 1 file changed, 1 insertion(+) (limited to 'main.c') diff --git a/main.c b/main.c index 19600fcc..92ec89fa 100644 --- a/main.c +++ b/main.c @@ -132,6 +132,7 @@ void toybox_main(void) toys.which = toy_list; if (toys.argv[1]) { + toys.optc = 0; toy_exec(toys.argv+1); if (toys.argv[1][0] == '-') goto list; -- cgit v1.2.3