diff --git a/tools/vsh.c b/tools/vsh.c index 9558dadb63ce0c38c185d9e2e4eb0689a659bc49..17199aecb2bfa150f37770e6138c793dbed9823c 100644 --- a/tools/vsh.c +++ b/tools/vsh.c @@ -2788,7 +2788,8 @@ vshReadlineParse(const char *text, int state) /* No -- option provided and some other token given * Try to find the default option. */ - if (!(opt = vshCmddefGetData(cmd, &opts_need_arg, &opts_seen)) + if (!(opt = vshCmddefGetData(cmd, &const_opts_need_arg, + &const_opts_seen)) || opt->type == VSH_OT_BOOL) goto error; opt_exists = true;