Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
7f9b9512
Commit
7f9b9512
authored
Dec 15, 2016
by
Dvir Volk
Browse files
fixed stop condition in RM_ZsetRangeNext and RM_ZsetRangePrev
parent
b53e73e1
Changes
1
Show whitespace changes
Inline
Side-by-side
src/module.c
View file @
7f9b9512
...
...
@@ -1858,12 +1858,12 @@ int RM_ZsetRangeNext(RedisModuleKey *key) {
} else {
/* Are we still within the range? */
if (key->ztype == REDISMODULE_ZSET_RANGE_SCORE &&
!zslValueLteMax(
l
n->score,&key->zrs))
!zslValueLteMax(n
ext
->score,&key->zrs))
{
key->zer = 1;
return 0;
} else if (key->ztype == REDISMODULE_ZSET_RANGE_LEX) {
if (!zslLexValueLteMax(
l
n->ele,&key->zlrs)) {
if (!zslLexValueLteMax(n
ext
->ele,&key->zlrs)) {
key->zer = 1;
return 0;
}
...
...
@@ -1921,7 +1921,7 @@ int RM_ZsetRangePrev(RedisModuleKey *key) {
} else {
/* Are we still within the range? */
if (key->ztype == REDISMODULE_ZSET_RANGE_SCORE &&
!zslValueGteMin(
ln
->score,&key->zrs))
!zslValueGteMin(
prev
->score,&key->zrs))
{
key->zer = 1;
return 0;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment