From b67f027699e8fc293e0bcf167cf296b380af5a5a Mon Sep 17 00:00:00 2001 From: antirez Date: Mon, 9 Jul 2018 13:36:47 +0200 Subject: [PATCH] redis-cli: fix #4990 additional argument in help. --- src/redis-cli.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/redis-cli.c b/src/redis-cli.c index 437cc8e9..299d4617 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--;