mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-23 00:28:26 -05:00
WITHSCORES in ZRANGEBYSCORE thanks to Sam Hendley
This commit is contained in:
parent
0500ef2736
commit
3a3978b10b
10
redis.c
10
redis.c
@ -5201,14 +5201,14 @@ static void zrangebyscoreCommand(redisClient *c) {
|
|||||||
int badsyntax = 0;
|
int badsyntax = 0;
|
||||||
|
|
||||||
if (c->argc == 5 || c->argc == 8) {
|
if (c->argc == 5 || c->argc == 8) {
|
||||||
if (strcasecmp(c->argv[c->argc-1]->ptr,"withscores") == 0) withscores = 1;
|
if (strcasecmp(c->argv[c->argc-1]->ptr,"withscores") == 0)
|
||||||
else badsyntax = 1;
|
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;
|
badsyntax = 1;
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (badsyntax) {
|
if (badsyntax) {
|
||||||
addReplySds(c,
|
addReplySds(c,
|
||||||
|
Loading…
Reference in New Issue
Block a user