From bd01334da1d27367ad9887f159f2860f7e8ba5ac Mon Sep 17 00:00:00 2001 From: Jeffrey Lovitz Date: Sun, 12 Aug 2018 12:47:01 -0400 Subject: [PATCH] CLI Help text loop verifies arg count --- src/redis-cli.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/redis-cli.c b/src/redis-cli.c index 0e8777bd..247d1f73 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";