From 28d5d8774112821d6f1d89230c23edb6c43b8679 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 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--;