Fixed undefined behavior in SkeletalTrapezoidation::generateExtraRibs.

This commit is contained in:
Lukáš Hejl 2022-04-25 09:21:33 +02:00
parent 3610afd393
commit 66a18fb60f

View File

@ -1425,8 +1425,7 @@ bool SkeletalTrapezoidation::isEndOfCentral(const edge_t& edge_to) const
void SkeletalTrapezoidation::generateExtraRibs() void SkeletalTrapezoidation::generateExtraRibs()
{ {
auto end_edge_it = --graph.edges.end(); // Don't check newly introduced edges for (auto edge_it = graph.edges.begin(); edge_it != graph.edges.end(); ++edge_it)
for (auto edge_it = graph.edges.begin(); std::prev(edge_it) != end_edge_it; ++edge_it)
{ {
edge_t& edge = *edge_it; edge_t& edge = *edge_it;