Unverified Commit cf9a3f70 authored by Salvatore Sanfilippo's avatar Salvatore Sanfilippo Committed by GitHub
Browse files

Merge pull request #2741 from kmiku7/unstable

fix boundary case for _dictNextPower
parents 30db8055 413d8239
...@@ -940,7 +940,7 @@ static unsigned long _dictNextPower(unsigned long size) ...@@ -940,7 +940,7 @@ static unsigned long _dictNextPower(unsigned long size)
{ {
unsigned long i = DICT_HT_INITIAL_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) { while(1) {
if (i >= size) if (i >= size)
return i; return i;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment