back edge->to is a root resolves #395

Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
James Cherry 2026-03-03 07:59:09 -08:00
parent eb0446d4e2
commit 62cd210a8a
1 changed files with 1 additions and 1 deletions

View File

@ -323,7 +323,7 @@ Levelize::findCycleBackEdges()
stack.emplace(vertex, new VertexOutEdgeIterator(vertex, graph_));
EdgeSet back_edges = findBackEdges(path, stack);
for (Edge *back_edge : back_edges)
roots_.insert(back_edge->from(graph_));
roots_.insert(back_edge->to(graph_));
back_edge_count += back_edges.size();
}
}