Fix a bug in r177497 which caused the getopts state to be reset when 'set'

was used to set a shell option (and not to change the positional parameters).

Submitted by:	Martin Kammerhofer
This commit is contained in:
Stefan Farfeleder 2008-08-27 20:16:06 +00:00
parent ceef66c0e3
commit 9144fae127

View File

@ -338,6 +338,7 @@ setparam(char **argv)
shellparam.malloc = 1;
shellparam.nparam = nparam;
shellparam.p = newparam;
shellparam.reset = 1;
shellparam.optnext = NULL;
}
@ -405,7 +406,6 @@ setcmd(int argc, char **argv)
if (*argptr != NULL) {
setparam(argptr);
}
shellparam.reset = 1;
INTON;
return 0;
}