[set] Another exact-size allocation

This commit is contained in:
Behdad Esfahbod 2022-12-31 12:42:29 -07:00
parent b803024caf
commit 0c6a721337
1 changed files with 1 additions and 0 deletions

View File

@ -422,6 +422,7 @@ struct hb_bit_set_t
private:
bool allocate_compact_workspace (hb_vector_t<unsigned>& workspace)
{
workspace.alloc (pages.length, true);
if (unlikely (!workspace.resize (pages.length)))
{
successful = false;