From 62c502cd9dc4637934f846caa9587a2aebca9ee9 Mon Sep 17 00:00:00 2001 From: Garret Rieger Date: Thu, 9 Sep 2021 09:57:42 -0700 Subject: [PATCH] [repacker] correctly update incoming_edges in duplicate. --- src/hb-repacker.hh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/hb-repacker.hh b/src/hb-repacker.hh index d2078938e..d5a603d38 100644 --- a/src/hb-repacker.hh +++ b/src/hb-repacker.hh @@ -427,7 +427,6 @@ struct graph_t { positions_invalid = true; distance_invalid = true; - // TODO(grieger): compute new distance instead of invalidation. auto* clone = vertices_.push (); auto& child = vertices_[node_idx]; @@ -442,9 +441,13 @@ struct graph_t clone->obj.tail = buffer->tail; clone->distance = child.distance; clone->space = child.space; + clone->incoming_edges = 0; for (const auto& l : child.obj.links) + { clone->obj.links.push (l); + vertices_[l.objidx].incoming_edges++; + } check_success (!clone->obj.links.in_error ());