diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2012-07-23 03:57:28 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2012-07-23 03:57:28 +0000 |
commit | 0abcd2ef510140d44653f6f4a4eb28db2306e3c2 (patch) | |
tree | e708a2a9ba5a763d50af61412aa931e904bab4f7 /libgo | |
parent | 8dbe2ebd94155a0a6d4782f34bb2284537f7d1f4 (diff) | |
download | gcc-0abcd2ef510140d44653f6f4a4eb28db2306e3c2.tar.gz |
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
Diffstat (limited to 'libgo')
-rw-r--r-- | libgo/runtime/go-new-map.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libgo/runtime/go-new-map.c b/libgo/runtime/go-new-map.c index eef71ddf47c..64466183924 100644 --- a/libgo/runtime/go-new-map.c +++ b/libgo/runtime/go-new-map.c @@ -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; } |