# HG changeset patch
# User Peter Kovacs <kpeter@inf.elte.hu>
# Date 1226009577 -3600
# Node ID 99dcd99637ba06d308970e8a8d0ae55a4656e7b2
# Parent  9194a12c52e6ff9cc83a855fe77aacc7538248bd
Critical bug fix in SmartDigraph::split()

diff --git a/lemon/smart_graph.h b/lemon/smart_graph.h
--- a/lemon/smart_graph.h
+++ b/lemon/smart_graph.h
@@ -305,7 +305,9 @@
       Node b = addNode();
       nodes[b._id].first_out=nodes[n._id].first_out;
       nodes[n._id].first_out=-1;
-      for(int i=nodes[b._id].first_out;i!=-1;i++) arcs[i].source=b._id;
+      for(int i=nodes[b._id].first_out; i!=-1; i=arcs[i].next_out) {
+        arcs[i].source=b._id;
+      }
       if(connect) addArc(n,b);
       return b;
     }
