Commit 3fbf9001 authored by Pieter Noordhuis's avatar Pieter Noordhuis
Browse files

fix LREM to remove *all* occurances when a zero argument is given

parent bd8db0ad
......@@ -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);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment