summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2015-02-08 11:19:47 +0100
committerantirez <antirez@gmail.com>2015-02-08 23:08:22 +0100
commitd275a942f815ab7aa493ae046ffdbb725c10a555 (patch)
tree298941d8bd63c7cb378be3bb85b84b42473aec59
parent9a28ead0a1939da6e88c85a596878c98e74f959a (diff)
downloadredis-d275a942f815ab7aa493ae046ffdbb725c10a555.tar.gz
dict.c: reset emptylen when bucket is not empty.
Fixed by @oranagra, thank you.
-rw-r--r--src/dict.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/dict.c b/src/dict.c
index 8f25c14bc..716d03fb0 100644
--- a/src/dict.c
+++ b/src/dict.c
@@ -811,6 +811,7 @@ unsigned int dictGetSomeKeys(dict *d, dictEntry **des, unsigned int count) {
emptylen = 0;
}
} else {
+ emptylen = 0;
while (he) {
/* Collect all the elements of the buckets found non
* empty while iterating. */