[repacker] use possibly updated root idx after isolate_subgraph.

isolate_subgraph can change the root indices in some cases. So operations after the isolation need to use the roots from the output of isolate_subgraph.
pull/3248/head
Garret Rieger 3 years ago
parent 5b882c420a
commit d17155f5d2
  1. 3
      src/hb-repacker.hh

@ -1048,7 +1048,8 @@ static bool _try_isolating_subgraphs (const hb_vector_t<graph_t::overflow_record
hb_set_t roots;
roots.add (root);
sorted_graph.isolate_subgraph (roots);
sorted_graph.move_to_new_space (root);
for (unsigned new_root : roots)
sorted_graph.move_to_new_space (new_root);
return true;
}
return false;

Loading…
Cancel
Save