Modules: a few fixes for the zset iterator.

This commit is contained in:
antirez
2016-04-25 10:39:02 +02:00
parent 33e1231e53
commit 5bf5fd24c6
2 changed files with 13 additions and 6 deletions

View File

@ -1366,7 +1366,7 @@ int RM_ZsetRangeNext(RedisModuleKey *key) {
return 0;
}
next = saved_next;
} else if (key->ztype == REDISMODULE_ZSET_RANGE_SCORE) {
} else if (key->ztype == REDISMODULE_ZSET_RANGE_LEX) {
if (!zzlLexValueLteMax(next,&key->zlrs)) {
key->zer = 1;
return 0;
@ -1429,7 +1429,7 @@ int RM_ZsetRangePrev(RedisModuleKey *key) {
return 0;
}
prev = saved_prev;
} else if (key->ztype == REDISMODULE_ZSET_RANGE_SCORE) {
} else if (key->ztype == REDISMODULE_ZSET_RANGE_LEX) {
if (!zzlLexValueGteMin(prev,&key->zlrs)) {
key->zer = 1;
return 0;