$OpenBSD: patch-getopt_c,v 1.1 2001/04/14 02:49:45 naddy Exp $ --- getopt.c.orig Thu Apr 5 20:14:42 2001 +++ getopt.c Thu Apr 5 20:15:49 2001 @@ -696,7 +696,7 @@ _getopt_internal (argc, argv, optstring, optarg = nameend + 1; else { - if (opterr) + if (opterr) { if (argv[optind - 1][1] == '-') /* --option */ fprintf (stderr, @@ -707,6 +707,7 @@ _getopt_internal (argc, argv, optstring, fprintf (stderr, _("%s: option `%c%s' doesn't allow an argument\n"), argv[0], argv[optind - 1][0], pfound->name); + } nextchar += strlen (nextchar);