diff --git a/src/graph/graph.hh b/src/graph/graph.hh index 9e962cfc5..5a6fc1b82 100644 --- a/src/graph/graph.hh +++ b/src/graph/graph.hh @@ -213,7 +213,10 @@ struct graph_t for (unsigned i = 0; i < count; i++) { if (parents.arrayZ[i] == old_index) - parents.arrayZ[i] = new_index; + { + parents.arrayZ[i] = new_index; + break; + } } }