diff options
author | Rob Landley <rob@landley.net> | 2014-04-01 18:18:46 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2014-04-01 18:18:46 -0500 |
commit | 52ab00b60863baf995522da1a638df4d6e9b0e8b (patch) | |
tree | e82756db9ca3148edcc52f5c009ca1d594f94ff4 /main.c | |
parent | 5b405827a2fa4c928c488f3e7b0197dfec60dcc2 (diff) | |
download | toybox-52ab00b60863baf995522da1a638df4d6e9b0e8b.tar.gz toybox-52ab00b60863baf995522da1a638df4d6e9b0e8b.tar.bz2 toybox-52ab00b60863baf995522da1a638df4d6e9b0e8b.zip |
bugfix: the multiplexer increments optc and then the command the multiplexer runs increments it further, resulting in a wrong count. Fix: zero it.
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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; |