argc will be 1 not 2 with no option value.

pull/1/head
Nicholas Marriott 2011-01-04 01:58:12 +00:00
parent 7502cb3adb
commit 55346b0d10
1 changed files with 1 additions and 1 deletions

View File

@ -115,7 +115,7 @@ cmd_set_option_exec(struct cmd *self, struct cmd_ctx *ctx)
ctx->error(ctx, "invalid option");
return (-1);
}
if (args->argc < 1)
if (args->argc < 2)
valstr = NULL;
else
valstr = args->argv[1];