added assertion in zslInsert() that ensures the inserted element score is not NaN
This commit is contained in:
parent
24accab2aa
commit
a244a13b4c
@ -76,6 +76,7 @@ zskiplistNode *zslInsert(zskiplist *zsl, double score, robj *obj) {
|
|||||||
unsigned int rank[ZSKIPLIST_MAXLEVEL];
|
unsigned int rank[ZSKIPLIST_MAXLEVEL];
|
||||||
int i, level;
|
int i, level;
|
||||||
|
|
||||||
|
redisAssert(!isnan(score));
|
||||||
x = zsl->header;
|
x = zsl->header;
|
||||||
for (i = zsl->level-1; i >= 0; i--) {
|
for (i = zsl->level-1; i >= 0; i--) {
|
||||||
/* store rank that is crossed to reach the insert position */
|
/* store rank that is crossed to reach the insert position */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user