diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/stdlib/getopt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/stdlib/getopt.c b/lib/libc/stdlib/getopt.c index 1b297a7..17059a8 100644 --- a/lib/libc/stdlib/getopt.c +++ b/lib/libc/stdlib/getopt.c @@ -89,7 +89,7 @@ getopt(nargc, nargv, ostr) return (-1); if (!*place) ++optind; - if (opterr && *ostr != ':') + if (opterr && *ostr != ':' && optopt != BADCH) (void)fprintf(stderr, "%s: illegal option -- %c\n", __progname, optopt); return (BADCH); |