From 541eb23895ab630cd6e208f2348cdd43ab8fddd8 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 69dfb757..43add192 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. */