From: antirez Date: Sun, 22 Mar 2009 13:59:05 +0000 (+0100) Subject: redis-cli now checks the arity of vararg commnads X-Git-Url: https://git.saurik.com/redis.git/commitdiff_plain/a74f2af61cb83e104cc9cc5ebd9292f14b6802fa redis-cli now checks the arity of vararg commnads --- diff --git a/redis-cli.c b/redis-cli.c index f6bf739b..38c986b3 100644 --- a/redis-cli.c +++ b/redis-cli.c @@ -224,7 +224,7 @@ static int cliSendCommand(int argc, char **argv) { } if ((rc->arity > 0 && argc != rc->arity) || - (rc->arity < 0 && argc < rc->arity)) { + (rc->arity < 0 && argc < -rc->arity)) { fprintf(stderr,"Wrong number of arguments for '%s'\n",rc->name); return 1; }