]> git.saurik.com Git - redis.git/commitdiff
fix for ZRANGEBYSCORE
authorantirez <antirez@gmail.com>
Mon, 26 Oct 2009 22:06:19 +0000 (23:06 +0100)
committerantirez <antirez@gmail.com>
Mon, 26 Oct 2009 22:06:19 +0000 (23:06 +0100)
redis.c

diff --git a/redis.c b/redis.c
index 09237345f2e98a455a0d39af2c6e300aff31daa4..3afceec01e640602e1d144f6068d1846b8e2535e 100644 (file)
--- a/redis.c
+++ b/redis.c
@@ -4128,7 +4128,7 @@ static void zrangebyscoreCommand(redisClient *c) {
             lenobj = createObject(REDIS_STRING,NULL);
             addReply(c,lenobj);
 
-            while(ln->score <= max) {
+            while(ln && ln->score <= max) {
                 ele = ln->obj;
                 addReplyBulkLen(c,ele);
                 addReply(c,ele);