OSDN Git Service

Fix for "--" options. Allow --xxx as a valid flag, from NetBSD fix.
authorBruce Momjian <bruce@momjian.us>
Mon, 26 Nov 2001 19:30:58 +0000 (19:30 +0000)
committerBruce Momjian <bruce@momjian.us>
Mon, 26 Nov 2001 19:30:58 +0000 (19:30 +0000)
src/utils/getopt.c

index 4426313..bbe81c1 100644 (file)
@@ -71,7 +71,7 @@ const char *ostr;
                        place = EMSG;
                        return -1;
                }
-               if (place[1] && *++place == '-')
+               if (place[1] && *++place == '-' && place[1] == '\0')
                {                                               /* found "--" */
                        ++optind;
                        place = EMSG;