From: antirez Date: Sun, 18 Dec 2011 10:12:58 +0000 (+0100) Subject: added assertion in zslInsert() that ensures the inserted element score is not NaN X-Git-Url: https://git.saurik.com/redis.git/commitdiff_plain/a244a13b4c5d74031432aa337d6be21b4f033efd?ds=sidebyside added assertion in zslInsert() that ensures the inserted element score is not NaN --- diff --git a/src/t_zset.c b/src/t_zset.c index ccf9962a..99faae85 100644 --- a/src/t_zset.c +++ b/src/t_zset.c @@ -76,6 +76,7 @@ zskiplistNode *zslInsert(zskiplist *zsl, double score, robj *obj) { unsigned int rank[ZSKIPLIST_MAXLEVEL]; int i, level; + redisAssert(!isnan(score)); x = zsl->header; for (i = zsl->level-1; i >= 0; i--) { /* store rank that is crossed to reach the insert position */