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;