From b3d45de6cff4501e6171ec9d9069af7de29584d4 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 30 May 2018 14:02:49 -0700 Subject: [PATCH] [map] Fix size calculation Don't know why I thought I should subtract one there... --- src/hb-map-private.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hb-map-private.hh b/src/hb-map-private.hh index ef2ee466..cdd90c5c 100644 --- a/src/hb-map-private.hh +++ b/src/hb-map-private.hh @@ -90,7 +90,7 @@ struct hb_map_t { if (unlikely (in_error)) return false; - unsigned int power = _hb_bit_storage (population * 2 + 8) - 1; + unsigned int power = _hb_bit_storage (population * 2 + 8); unsigned int new_size = 1u << power; item_t *new_items = (item_t *) malloc ((size_t) new_size * sizeof (item_t)); if (unlikely (!new_items)) -- GitLab