From caa84eb4454318f64f3d3128c3afc74ef511634d Mon Sep 17 00:00:00 2001 From: antirez Date: Sun, 18 Dec 2011 11:12:58 +0100 Subject: [PATCH] added assertion in zslInsert() that ensures the inserted element score is not NaN --- src/t_zset.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/t_zset.c b/src/t_zset.c index ccf9962a1..99faae858 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 */