RM_ZsetRangeNext()/Prev() typo in define name leading to crash fixed.

This commit is contained in:
antirez 2016-05-10 00:38:48 +02:00
parent 5f977c3f8b
commit 5daece2ec6

View File

@ -1535,7 +1535,7 @@ int RM_ZsetRangeNext(RedisModuleKey *key) {
{
key->zer = 1;
return 0;
} else if (key->ztype == REDISMODULE_ZSET_RANGE_SCORE) {
} else if (key->ztype == REDISMODULE_ZSET_RANGE_LEX) {
if (!zslLexValueLteMax(ln->ele,&key->zlrs)) {
key->zer = 1;
return 0;
@ -1598,7 +1598,7 @@ int RM_ZsetRangePrev(RedisModuleKey *key) {
{
key->zer = 1;
return 0;
} else if (key->ztype == REDISMODULE_ZSET_RANGE_SCORE) {
} else if (key->ztype == REDISMODULE_ZSET_RANGE_LEX) {
if (!zslLexValueGteMin(prev->ele,&key->zlrs)) {
key->zer = 1;
return 0;