[traverse] fix early finish, only if next turn index of that operation

is the start index
This commit is contained in:
Barend Gehrels
2019-01-23 15:46:19 +01:00
parent 1300f8f816
commit e8156729c8

View File

@@ -208,10 +208,11 @@ struct traversal_ring_creator
if (start_turn.is_clustered())
{
turn_type const& turn = m_turns[current_turn_index];
if (turn.cluster_id == start_turn.cluster_id)
turn_type& turn = m_turns[current_turn_index];
turn_operation_type& op = turn.operations[current_op_index];
if (turn.cluster_id == start_turn.cluster_id
&& op.enriched.get_next_turn_index() == start_turn_index)
{
turn_operation_type& op = m_turns[start_turn_index].operations[current_op_index];
op.visited.set_finished();
m_visitor.visit_traverse(m_turns, m_turns[current_turn_index], start_op, "Early finish (cluster)");
return traverse_error_none;