fix boundary case for _dictNextPower

This commit is contained in:
kmiku7
2017-11-08 17:09:05 +01:00
committed by antirez
parent 0aa0cdf7cc
commit bab437bef3
+1 -1
View File
@@ -949,7 +949,7 @@ static unsigned long _dictNextPower(unsigned long size)
{
unsigned long i = DICT_HT_INITIAL_SIZE;
if (size >= LONG_MAX) return LONG_MAX;
if (size >= LONG_MAX) return LONG_MAX + 1LU;
while(1) {
if (i >= size)
return i;