diff options
Diffstat (limited to 'winsup/cygwin/lib')
-rw-r--r-- | winsup/cygwin/lib/getopt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/lib/getopt.c b/winsup/cygwin/lib/getopt.c index c6f967d..effa5d7 100644 --- a/winsup/cygwin/lib/getopt.c +++ b/winsup/cygwin/lib/getopt.c @@ -214,7 +214,7 @@ getopt_internal(int nargc, char *const * nargv, const char *options) * XXX re-initialize optind to 0 and have getopt_long(3) * XXX properly function again. Work around this braindamage. */ - if (optind == 0) + if (optind == 0 && optreset == 0) optind = 1; if (optreset) |