Navigation Menu

Skip to content

Commit

Permalink
zzlIsInRange() now is capable of handling empty sorted sets that may …
Browse files Browse the repository at this point in the history
…end inside the data set when loading very old RDB files produced by early-stage versions of Redis.
  • Loading branch information
antirez committed Feb 22, 2012
1 parent 9f50ce0 commit f165443
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/t_zset.c
Expand Up @@ -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;
Expand Down

0 comments on commit f165443

Please sign in to comment.