changeset 1236:1f4a56212c83 draft

bugfix: the multiplexer increments optc and then the command the multiplexer runs increments it further, resulting in a wrong count. Fix: zero it.
author Rob Landley <rob@landley.net>
date Tue, 01 Apr 2014 18:18:46 -0500
parents 63db77909fc8
children 867f9c964f3e
files main.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/main.c	Sat Mar 29 18:11:00 2014 -0500
+++ b/main.c	Tue Apr 01 18:18:46 2014 -0500
@@ -132,6 +132,7 @@
 
   toys.which = toy_list;
   if (toys.argv[1]) {
+    toys.optc = 0;
     toy_exec(toys.argv+1);
     if (toys.argv[1][0] == '-') goto list;