runtime: correct a logic error in hashmap growth.

The bug prevented maps to grow properly to sizes
larger than 1.3 million.

From Rémy Oudompheng.

From-SVN: r189766
This commit is contained in:
Ian Lance Taylor 2012-07-23 03:57:28 +00:00
parent 8dbe2ebd94
commit 0abcd2ef51

View File

@ -90,9 +90,9 @@ __go_map_next_prime (uintptr_t n)
/* Here LOW <= MID < HIGH. */
if (prime_list[mid] < n)
high = mid;
else if (prime_list[mid] > n)
low = mid + 1;
else if (prime_list[mid] > n)
high = mid;
else
return n;
}