提交 b3d45de6 编写于 作者: B Behdad Esfahbod

[map] Fix size calculation

Don't know why I thought I should subtract one there...
上级 ff92de76
......@@ -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))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册