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, 3 insertions, 2 deletions
diff --git a/mysys/my_getopt.c b/mysys/my_getopt.c
index d304b5076f9..3d216ed7aa0 100644
--- a/mysys/my_getopt.c
+++ b/mysys/my_getopt.c
@@ -367,9 +367,10 @@ int handle_options(int *argc, char ***argv,
/* Check if there are more arguments after this one */
if (!pos[1])
{
- if (optp->var_type == GET_BOOL && optp->arg_type == OPT_ARG)
+ if (optp->arg_type == OPT_ARG)
{
- *((my_bool*) optp->value)= (my_bool) 1;
+ if (optp->var_type == GET_BOOL)
+ *((my_bool*) optp->value)= (my_bool) 1;
get_one_option(optp->id, optp, argument);
continue;
}