summaryrefslogtreecommitdiffstats
path: root/cli
diff options
context:
space:
mode:
Diffstat (limited to 'cli')
-rw-r--r--cli/src/cli-cmd.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/cli/src/cli-cmd.c b/cli/src/cli-cmd.c
index d19703abb45..24c7dea0e00 100644
--- a/cli/src/cli-cmd.c
+++ b/cli/src/cli-cmd.c
@@ -48,6 +48,9 @@ cli_cmd_process (struct cli_state *state, int argc, char **argv)
word = &state->tree.root;
+ if (!argc)
+ return 0;
+
for (i = 0; i < argc; i++) {
next = cli_cmd_nextword (word, argv[i]);