mirror of
https://github.com/fluencelabs/redis
synced 2025-03-23 19:10:51 +00:00
fix LREM to remove *all* occurances when a zero argument is given
This commit is contained in:
parent
bd8db0ada8
commit
3fbf9001ce
4
redis.c
4
redis.c
@ -5196,12 +5196,12 @@ static void lremCommand(redisClient *c) {
|
||||
li = lInitIterator(subject,0);
|
||||
}
|
||||
|
||||
while (toremove && lIsEntry(li)) {
|
||||
while (lIsEntry(li)) {
|
||||
if (lEqualTo(li,obj)) {
|
||||
lDelete(li,direction);
|
||||
server.dirty++;
|
||||
toremove--;
|
||||
removed++;
|
||||
if (toremove && removed == toremove) break;
|
||||
} else {
|
||||
lMove(li,direction);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user