From 9144fae127d648fcb3c7ff88cd298d319ccd80cb Mon Sep 17 00:00:00 2001 From: Stefan Farfeleder Date: Wed, 27 Aug 2008 20:16:06 +0000 Subject: [PATCH] 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 --- bin/sh/options.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/sh/options.c b/bin/sh/options.c index ff5736d31b94..fea95ca28c68 100644 --- a/bin/sh/options.c +++ b/bin/sh/options.c @@ -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; }