diff --git a/src/t_zset.c b/src/t_zset.c index ce3b85f36..679477a6f 100644 --- a/src/t_zset.c +++ b/src/t_zset.c @@ -488,7 +488,7 @@ unsigned long zslGetRank(zskiplist *zsl, double score, sds ele) { } /* x might be equal to zsl->header, so test if obj is non-NULL */ - if (x->ele && sdscmp(x->ele,ele) == 0) { + if (x->ele && x->score == score && sdscmp(x->ele,ele) == 0) { return rank; } }