summaryrefslogtreecommitdiffstats
path: root/cli/src
diff options
context:
space:
mode:
Diffstat (limited to 'cli/src')
-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 d19703abb..24c7dea0e 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]);