Fix bug when start=regular but mode is not KK
authorerg <devnull@localhost>
Fri, 2 Jun 2006 23:17:17 +0000 (23:17 +0000)
committererg <devnull@localhost>
Fri, 2 Jun 2006 23:17:17 +0000 (23:17 +0000)
lib/neatogen/neatoinit.c

index 5e8054bb9dd232b07b15253a4f07b2c149307e35..5c94fc07e52455588576445697dec9c9219f7adc 100644 (file)
@@ -989,13 +989,12 @@ static void freeGraphData(vtx_data * graph)
 
 static void initRegular(graph_t * G, int nG)
 {
-    int i;
     double a, da;
     node_t *np;
 
     a = 0.0;
     da = (2 * PI) / nG;
-    for (i = 0; (np = GD_neato_nlist(G)[i]); i++) {
+    for (np = agfstnode(G); np; np = agnxtnode(G, np)) {
        ND_pos(np)[0] = nG * Spring_coeff * cos(a);
        ND_pos(np)[1] = nG * Spring_coeff * sin(a);
        ND_pinned(np) = P_SET;