bugfix: the multiplexer increments optc and then the command the multiplexer runs increments it further, resulting in a wrong count. Fix: zero it.

This commit is contained in:
Rob Landley 2014-04-01 18:18:46 -05:00
parent 5b405827a2
commit 52ab00b608

1
main.c
View File

@ -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;