From: Bruce Momjian Date: Mon, 26 Nov 2001 19:30:58 +0000 (+0000) Subject: Fix for "--" options. Allow --xxx as a valid flag, from NetBSD fix. X-Git-Tag: REL7_2_BETA4~164 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=be545eaf73bc0ac2d6b2f311f8c333e76a348181;p=postgresql Fix for "--" options. Allow --xxx as a valid flag, from NetBSD fix. --- diff --git a/src/utils/getopt.c b/src/utils/getopt.c index 442631347c..bbe81c1699 100644 --- a/src/utils/getopt.c +++ b/src/utils/getopt.c @@ -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;