summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2015-02-08 11:19:47 +0100
committerantirez <antirez@gmail.com>2015-02-11 11:01:46 +0100
commit541eb23895ab630cd6e208f2348cdd43ab8fddd8 (patch)
treeb3ff3657016f235832189eb67d5d679e03cc3339
parent08ad51762bdeabbc8dc416052a44bc59da7f10e2 (diff)
downloadredis-541eb23895ab630cd6e208f2348cdd43ab8fddd8.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 69dfb7572..43add1927 100644
--- a/src/dict.c
+++ b/src/dict.c
@@ -808,6 +808,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. */