summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bin/common/opj_getopt.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/bin/common/opj_getopt.c b/src/bin/common/opj_getopt.c
index ef9a920a..5db94ca0 100644
--- a/src/bin/common/opj_getopt.c
+++ b/src/bin/common/opj_getopt.c
@@ -240,6 +240,7 @@ again:
'-') { /* Has read next input parameter: No arg for current parameter */
if (opj_opterr) {
fprintf(stderr, "%s: option requires an argument\n", arg);
+ ++opj_optind;
return (BADCH);
}
}
@@ -247,6 +248,7 @@ again:
if (!opj_optarg) { /* missing argument */
if (opj_opterr) {
fprintf(stderr, "%s: option requires an argument\n", arg);
+ ++opj_optind;
return (BADCH);
}
}