summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSalvatore Sanfilippo <antirez@gmail.com>2018-09-07 12:28:22 +0200
committerGitHub <noreply@github.com>2018-09-07 12:28:22 +0200
commit83b8eaa6386f4449c99d6e76c44f3035a20172eb (patch)
tree14a5039da6b9acfec4575fa9585efd68c183a520
parenta62b8410ef42cc9fe30bef68c6da0feef88727c0 (diff)
parentbd01334da1d27367ad9887f159f2860f7e8ba5ac (diff)
downloadredis-83b8eaa6386f4449c99d6e76c44f3035a20172eb.tar.gz
Merge pull request #5239 from jeffreylovitz/cli-help-fix
CLI Help text loop verifies arg count
-rw-r--r--src/redis-cli.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/redis-cli.c b/src/redis-cli.c
index 2bb8c56f8..536eeb79f 100644
--- a/src/redis-cli.c
+++ b/src/redis-cli.c
@@ -545,7 +545,7 @@ static void cliIntegrateHelp(void) {
ch->params = sdscat(ch->params,"key ");
args--;
}
- while(args--) ch->params = sdscat(ch->params,"arg ");
+ while(args-- > 0) ch->params = sdscat(ch->params,"arg ");
if (entry->element[1]->integer < 0)
ch->params = sdscat(ch->params,"...options...");
ch->summary = "Help not available";