summaryrefslogtreecommitdiff
path: root/mysys/my_getopt.c
diff options
context:
space:
mode:
Diffstat (limited to 'mysys/my_getopt.c')
-rw-r--r--mysys/my_getopt.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/mysys/my_getopt.c b/mysys/my_getopt.c
index c1b0a129a30..7905ad90877 100644
--- a/mysys/my_getopt.c
+++ b/mysys/my_getopt.c
@@ -720,6 +720,11 @@ static int setval(const struct my_option *opts, void *value, char *argument,
}
*(ulong*)value= arg;
}
+ else if (type < 0)
+ {
+ res= EXIT_AMBIGUOUS_OPTION;
+ goto ret;
+ }
else
*(ulong*)value= type - 1;
}