dictScan(): empty hash table requires special handling.

This commit is contained in:
antirez 2013-10-28 11:17:18 +01:00
parent cd8cb49dc4
commit dfeaa84d46

View File

@ -754,6 +754,8 @@ unsigned long dictScan(dict *d,
unsigned long s0, s1;
unsigned long m0, m1;
if (dictSize(d) == 0) return 0;
if (!dictIsRehashing(d)) {
t0 = &(d->ht[0]);
m0 = t0->sizemask;