Critical bug fix in SmartDigraph::split() #170
authorPeter Kovacs <kpeter@inf.elte.hu>
Thu, 06 Nov 2008 23:12:57 +0100
changeset 37000c8843d491d
parent 322 6dbd5184c6a9
child 371 164fe3abc024
child 373 5a3d689ea770
Critical bug fix in SmartDigraph::split() #170
lemon/smart_graph.h
     1.1 --- a/lemon/smart_graph.h	Sun Oct 12 19:35:48 2008 +0100
     1.2 +++ b/lemon/smart_graph.h	Thu Nov 06 23:12:57 2008 +0100
     1.3 @@ -305,7 +305,9 @@
     1.4        Node b = addNode();
     1.5        nodes[b._id].first_out=nodes[n._id].first_out;
     1.6        nodes[n._id].first_out=-1;
     1.7 -      for(int i=nodes[b._id].first_out;i!=-1;i++) arcs[i].source=b._id;
     1.8 +      for(int i=nodes[b._id].first_out; i!=-1; i=arcs[i].next_out) {
     1.9 +        arcs[i].source=b._id;
    1.10 +      }
    1.11        if(connect) addArc(n,b);
    1.12        return b;
    1.13      }