From feb282883b171c7bba13551f82c7049d36d81ead Mon Sep 17 00:00:00 2001 From: antirez Date: Wed, 22 Feb 2012 09:52:10 +0100 Subject: [PATCH] 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. --- src/t_zset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/t_zset.c b/src/t_zset.c index b8ad2fc6e..d482d4c2f 100644 --- a/src/t_zset.c +++ b/src/t_zset.c @@ -502,7 +502,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;