aboutsummaryrefslogtreecommitdiffstats
path: root/cli.c
diff options
context:
space:
mode:
authormatteo <matteo@f38db490-d61c-443f-a65b-d21fe96a405b>2003-02-18 18:15:30 +0000
committermatteo <matteo@f38db490-d61c-443f-a65b-d21fe96a405b>2003-02-18 18:15:30 +0000
commit28be2d6a7cb7f8915b0f346a9a2c02dd2fc5bf1f (patch)
tree0de34ae75587bde85880b54639d681ab4e4b986a /cli.c
parent08261a60e010fae1f1ecb545a98fccbde00b59b6 (diff)
mar feb 18 19:15:15 CET 2003
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@618 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'cli.c')
-rwxr-xr-xcli.c2
1 files changed, 1 insertions, 1 deletions
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];