Fix command completion (bug #988)
authorJames Golovich <james@gnuinter.net>
Sun, 15 Feb 2004 05:19:44 +0000 (05:19 +0000)
committerJames Golovich <james@gnuinter.net>
Sun, 15 Feb 2004 05:19:44 +0000 (05:19 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2163 65c4cc65-6c06-0410-ace0-fbb531ad65f3

cli.c

diff --git a/cli.c b/cli.c
index 054535c..8bc747b 100755 (executable)
--- a/cli.c
+++ b/cli.c
@@ -948,7 +948,7 @@ static char *__ast_cli_generator(char *text, char *word, int state, int lock)
                                fullcmd = fullcmd1;
                                e1++;
                        }
-                       if ((fullcmd[0] != '_') && !strncasecmp(matchstr, fullcmd, strlen(matchstr))) {
+                       if ((fullcmd[0] != '_') && !strncasecmp(text, fullcmd, strlen(text))) {
                                /* We contain the first part of one or more commands */
                                matchnum++;
                                if (matchnum > state) {