diff options
author | antirez <antirez@gmail.com> | 2012-02-22 09:52:10 +0100 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2012-02-22 09:52:39 +0100 |
commit | f1654434deb49c4a299e4613944587bc0bd77bd9 (patch) | |
tree | 2592ad208af869f80035c179c89af98dfddc0e0e | |
parent | 9f50ce0d8da63bb69f45ad08560d94ff0cdcf279 (diff) | |
download | redis-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.c | 2 |
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; |