From 3a3978b10bd05d16691a0c95fa3a89741a5a68d8 Mon Sep 17 00:00:00 2001 From: antirez Date: Sun, 7 Feb 2010 10:32:28 +0100 Subject: [PATCH] WITHSCORES in ZRANGEBYSCORE thanks to Sam Hendley --- redis.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/redis.c b/redis.c index f60569de..c0956490 100644 --- a/redis.c +++ b/redis.c @@ -5201,14 +5201,14 @@ static void zrangebyscoreCommand(redisClient *c) { int badsyntax = 0; if (c->argc == 5 || c->argc == 8) { - if (strcasecmp(c->argv[c->argc-1]->ptr,"withscores") == 0) withscores = 1; - else badsyntax = 1; + if (strcasecmp(c->argv[c->argc-1]->ptr,"withscores") == 0) + withscores = 1; + else + badsyntax = 1; } - if (c->argc != (4 + withscores) && c->argc != (7 + withscores)) { + if (c->argc != (4 + withscores) && c->argc != (7 + withscores)) badsyntax = 1; - } - if (badsyntax) { addReplySds(c, -- GitLab