From: Emden Gansner Date: Wed, 20 Jun 2012 15:41:31 +0000 (-0400) Subject: Fix bug with undirected graphs. With cgraph, simple edge pointer comparison X-Git-Tag: LAST_LIBGRAPH~32^2~391^2~3^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=60db94dddf2cf825f88674d4e7c687ba0332bb66;p=graphviz Fix bug with undirected graphs. With cgraph, simple edge pointer comparison doesn't work. One can only compare outedges with outedges and inedges with inedges. --- diff --git a/lib/dotgen/class2.c b/lib/dotgen/class2.c index 6443bbbbf..ac814e903 100644 --- a/lib/dotgen/class2.c +++ b/lib/dotgen/class2.c @@ -278,7 +278,11 @@ void class2(graph_t * g) else { /*other_edge(e); */ /* avoid when opp==e in undirected graph */ +#ifndef WITH_CGRAPH if ((opp = agfindedge(g, aghead(e), agtail(e))) && (opp != e)) { +#else + if ((opp = agfindedge(g, aghead(e), agtail(e))) && (AGMKOUT(opp) != e)) { +#endif /* WITH_CGRAPH */ /* shadows a forward edge */ if (ED_to_virt(opp) == NULL) make_chain(g, agtail(opp), aghead(opp), opp);