Skip to content

Commit

Permalink
WITHSCORES in ZRANGEBYSCORE thanks to Sam Hendley
Browse files Browse the repository at this point in the history
  • Loading branch information
antirez committed Feb 7, 2010
1 parent 0500ef2 commit 3a3978b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions redis.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 3a3978b

Please sign in to comment.