diff --git a/src/hb-map.hh b/src/hb-map.hh index 3886449c8..94648b289 100644 --- a/src/hb-map.hh +++ b/src/hb-map.hh @@ -160,6 +160,8 @@ struct hb_hashmap_t { if (unlikely (!successful)) return false; + if (new_population != 0 && new_population <= population) return true; + unsigned int power = hb_bit_storage (hb_max (population, new_population) * 2 + 8); unsigned int new_size = 1u << power; item_t *new_items = (item_t *) hb_malloc ((size_t) new_size * sizeof (item_t));