From: north Date: Wed, 11 Mar 2009 01:00:24 +0000 (+0000) Subject: fixed bug in handling self-edges in agnxtedge() X-Git-Tag: LAST_LIBGRAPH~32^2~2294 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d66c6f123a383f97df2b62a84cdd7b7d3690a3f0;p=graphviz fixed bug in handling self-edges in agnxtedge() --- diff --git a/lib/cgraph/edge.c b/lib/cgraph/edge.c index 98e45f1a5..5510cb6ba 100644 --- a/lib/cgraph/edge.c +++ b/lib/cgraph/edge.c @@ -91,12 +91,12 @@ Agedge_t *agnxtedge(Agraph_t * g, Agedge_t * e, Agnode_t * n) { Agedge_t *rv; - if (n == AGTAIL(e)) { - rv = agnxtout(g, e); - if (rv == NILedge) - rv = agfstin(g, n); + if (AGTYPE(e) == AGOUTEDGE) { + rv = agnxtout(g, e); + if (rv == NILedge) + rv = agfstin(g, n); } else - rv = agnxtin(g, e); + rv = agnxtin(g, e); return rv; }