aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compat/getopt.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/compat/getopt.c b/compat/getopt.c
index 3a532372..38c317cc 100644
--- a/compat/getopt.c
+++ b/compat/getopt.c
@@ -67,6 +67,8 @@ BSDgetopt(int nargc, char *const *nargv, const char *ostr)
return (-1);
}
if (place[1] && *++place == '-') { /* found "--" */
+ if (place[1])
+ return (BADCH);
++BSDoptind;
place = EMSG;
return (-1);