zzlIsInRange() now is capable of handling empty sorted sets that may end inside the data set when loading very old RDB files produced by early-stage versions of Redis.
This commit is contained in:
parent
7c96b467c1
commit
feb282883b
@ -502,7 +502,7 @@ int zzlIsInRange(unsigned char *zl, zrangespec *range) {
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
p = ziplistIndex(zl,-1); /* Last score. */
|
p = ziplistIndex(zl,-1); /* Last score. */
|
||||||
redisAssert(p != NULL);
|
if (p == NULL) return 0; /* Empty sorted set */
|
||||||
score = zzlGetScore(p);
|
score = zzlGetScore(p);
|
||||||
if (!zslValueGteMin(score,range))
|
if (!zslValueGteMin(score,range))
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user