From 8ddc14523fe5773d99a2dffba748d349f4419994 Mon Sep 17 00:00:00 2001 From: antirez Date: Sun, 8 Feb 2015 11:19:47 +0100 Subject: [PATCH] dict.c: reset emptylen when bucket is not empty. Fixed by @oranagra, thank you. --- src/dict.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/dict.c b/src/dict.c index 8f25c14b..716d03fb 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. */