summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2012-02-22 09:52:10 +0100
committerantirez <antirez@gmail.com>2012-02-22 09:52:39 +0100
commitf1654434deb49c4a299e4613944587bc0bd77bd9 (patch)
tree2592ad208af869f80035c179c89af98dfddc0e0e
parent9f50ce0d8da63bb69f45ad08560d94ff0cdcf279 (diff)
downloadredis-f1654434deb49c4a299e4613944587bc0bd77bd9.tar.gz
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.
-rw-r--r--src/t_zset.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/t_zset.c b/src/t_zset.c
index 0f0e2be9c..c3fe16e1f 100644
--- a/src/t_zset.c
+++ b/src/t_zset.c
@@ -504,7 +504,7 @@ int zzlIsInRange(unsigned char *zl, zrangespec *range) {
return 0;
p = ziplistIndex(zl,-1); /* Last score. */
- redisAssert(p != NULL);
+ if (p == NULL) return 0; /* Empty sorted set */
score = zzlGetScore(p);
if (!zslValueGteMin(score,range))
return 0;