X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/fe7be460257627848987d7bf6d80ce8540b01628..b1ee7da75a4191bf1785f598c158b191104fdc38:/src/t_zset.c diff --git a/src/t_zset.c b/src/t_zset.c index b8ad2fc6..50ad8d43 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; @@ -1259,7 +1259,9 @@ int zuiNext(zsetopsrc *op, zsetopval *val) { if (op->type == REDIS_SET) { iterset *it = &op->iter.set; if (op->encoding == REDIS_ENCODING_INTSET) { - if (!intsetGet(it->is.is,it->is.ii,(int64_t*)&val->ell)) + int64_t ell = val->ell; + + if (!intsetGet(it->is.is,it->is.ii,&ell)) return 0; val->score = 1.0;