dictScan(): empty hash table requires special handling.
This commit is contained in:
parent
e74c235567
commit
99efa37a6b
@ -754,6 +754,8 @@ unsigned long dictScan(dict *d,
|
|||||||
unsigned long s0, s1;
|
unsigned long s0, s1;
|
||||||
unsigned long m0, m1;
|
unsigned long m0, m1;
|
||||||
|
|
||||||
|
if (dictSize(d) == 0) return 0;
|
||||||
|
|
||||||
if (!dictIsRehashing(d)) {
|
if (!dictIsRehashing(d)) {
|
||||||
t0 = &(d->ht[0]);
|
t0 = &(d->ht[0]);
|
||||||
m0 = t0->sizemask;
|
m0 = t0->sizemask;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user