From 28be2d6a7cb7f8915b0f346a9a2c02dd2fc5bf1f Mon Sep 17 00:00:00 2001 From: matteo Date: Tue, 18 Feb 2003 18:15:30 +0000 Subject: mar feb 18 19:15:15 CET 2003 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@618 f38db490-d61c-443f-a65b-d21fe96a405b --- cli.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cli.c') diff --git a/cli.c b/cli.c index d7ebcc758..ef1810d2d 100755 --- a/cli.c +++ b/cli.c @@ -801,7 +801,7 @@ static char *__ast_cli_generator(char *text, char *word, int state, int lock) matchnum++; if (matchnum > state) { /* Now, what we're supposed to return is the next word... */ - if (strlen(word)) { + if (strlen(word) && x>0) { res = e->cmda[x-1]; } else { res = e->cmda[x]; -- cgit v1.2.3