From 0abcd2ef510140d44653f6f4a4eb28db2306e3c2 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Mon, 23 Jul 2012 03:57:28 +0000 Subject: [PATCH] runtime: correct a logic error in hashmap growth. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The bug prevented maps to grow properly to sizes larger than 1.3 million. From Rémy Oudompheng. From-SVN: r189766 --- libgo/runtime/go-new-map.c | 4 ++-- 1 file 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; }