summaryrefslogtreecommitdiff
path: root/src/redis-cli.c
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2018-07-09 13:36:47 +0200
committerantirez <antirez@gmail.com>2018-07-09 13:36:47 +0200
commitb67f027699e8fc293e0bcf167cf296b380af5a5a (patch)
tree271abe241d58f44317f56426e28b0cdc0f3e6102 /src/redis-cli.c
parent18d65849fd40639d752d3f7409f2fd23d6321662 (diff)
downloadredis-b67f027699e8fc293e0bcf167cf296b380af5a5a.tar.gz
redis-cli: fix #4990 additional argument in help.
Diffstat (limited to 'src/redis-cli.c')
-rw-r--r--src/redis-cli.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/redis-cli.c b/src/redis-cli.c
index 437cc8e9c..299d46174 100644
--- a/src/redis-cli.c
+++ b/src/redis-cli.c
@@ -542,6 +542,7 @@ static void cliIntegrateHelp(void) {
ch->name = new->argv[0];
ch->params = sdsempty();
int args = llabs(entry->element[1]->integer);
+ args--; /* Remove the command name itself. */
if (entry->element[3]->integer == 1) {
ch->params = sdscat(ch->params,"key ");
args--;