diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2013-02-12 20:36:22 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2013-02-12 20:36:22 +0000 |
commit | 0f31d231db7502a6470fea4db9c3bf9aa48c1fd5 (patch) | |
tree | 64693a9c7a190f794b466892fe730209551b5e4c /compat | |
parent | 102cb7743545a1d86c53e7958fc56ec599ba0cd7 (diff) |
Return error for --foo when using compat/getopt.c.
Diffstat (limited to 'compat')
-rw-r--r-- | compat/getopt.c | 2 |
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); |