From 55346b0d103016e8ee633e08e41b8b977b5904ef Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Tue, 4 Jan 2011 01:58:12 +0000 Subject: argc will be 1 not 2 with no option value. --- cmd-set-option.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd-set-option.c') diff --git a/cmd-set-option.c b/cmd-set-option.c index 2aa99f10..efd5797a 100644 --- a/cmd-set-option.c +++ b/cmd-set-option.c @@ -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]; -- cgit v1.2.3