]> granicus.if.org Git - graphviz/commitdiff
Fix bug in agdegree; out was being also used for in
authorerg <devnull@localhost>
Fri, 3 Apr 2009 18:26:07 +0000 (18:26 +0000)
committererg <devnull@localhost>
Fri, 3 Apr 2009 18:26:07 +0000 (18:26 +0000)
lib/cgraph/graph.c

index e04a9da76b65203dbe4e91174f450236acc5ea77..d2507daf8ecd6375143b8897ced0ec2fcf8c6b94 100644 (file)
@@ -230,7 +230,7 @@ int agdegree(Agraph_t * g, Agnode_t * n, int want_in, int want_out)
 
     sn = agsubrep(g, n);
     if (want_out) rv += cnt(g->e_seq,&(sn->out_seq));
-    if (want_in) rv += cnt(g->e_seq,&(sn->out_seq));
+    if (want_in) rv += cnt(g->e_seq,&(sn->in_seq));
        return rv;
 }