summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2015-02-08 11:19:47 +0100
committerantirez <antirez@gmail.com>2015-02-11 10:52:27 +0100
commit8ddc14523fe5773d99a2dffba748d349f4419994 (patch)
tree46208a10415df059096ad9ed3d7239c6f2add8fd
parentedda00b902910c73b5d2dcb56e43a66b6d541193 (diff)
downloadredis-8ddc14523fe5773d99a2dffba748d349f4419994.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. */