]> granicus.if.org Git - graphviz/commitdiff
Fix bug with undirected graphs. With cgraph, simple edge pointer comparison
authorEmden Gansner <erg@research.att.com>
Wed, 20 Jun 2012 15:41:31 +0000 (11:41 -0400)
committerEmden Gansner <erg@research.att.com>
Wed, 20 Jun 2012 15:41:31 +0000 (11:41 -0400)
doesn't work. One can only compare outedges with outedges and inedges with inedges.

lib/dotgen/class2.c

index 6443bbbbf8231c873e4a136a61a1423be7750348..ac814e90392912f549f0f22ad4f8aa3d723b3455 100644 (file)
@@ -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);