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:
parent
ceef66c0e3
commit
9144fae127
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user