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
90d918bd
Commit
90d918bd
authored
Dec 15, 2016
by
Dvir Volk
Committed by
antirez
Dec 16, 2016
Browse files
fixed stop condition in RM_ZsetRangeNext and RM_ZsetRangePrev
parent
3b19580a
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/module.c
View file @
90d918bd
...
...
@@ -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