X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/23d4709dfbdc5d8f669c2e376159ffdfb4d37471..6f864e62661637917ce6b449ae2c5e11538dfa1f:/dict.c diff --git a/dict.c b/dict.c index 4e740e7d..9360d52e 100644 --- a/dict.c +++ b/dict.c @@ -377,7 +377,7 @@ dictEntry *dictGetRandomKey(dict *ht) unsigned int h; int listlen, listele; - if (ht->size == 0) return NULL; + if (ht->used == 0) return NULL; do { h = random() & ht->sizemask; he = ht->table[h];