From: Emden R. Gansner Date: Thu, 17 Apr 2014 15:56:07 +0000 (-0400) Subject: Fix logic for loopless graphs X-Git-Tag: TRAVIS_CI_BUILD_EXPERIMENTAL~225 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=715a8f685524931684b7bc51cd5da8fcaec17f0d;p=graphviz Fix logic for loopless graphs --- diff --git a/lib/cgraph/edge.c b/lib/cgraph/edge.c index cb8191ac9..0e491eae6 100644 --- a/lib/cgraph/edge.c +++ b/lib/cgraph/edge.c @@ -246,13 +246,13 @@ static int ok_to_make_edge(Agraph_t * g, Agnode_t * t, Agnode_t * h) /* protect against self, multi-edges in strict graphs */ if (agisstrict(g)) { - if (g->desc.no_loop && (t == h)) /* simple graphs */ - return FALSE; key = Tag; key.objtype = 0; /* wild card */ if (agfindedge_by_key(g, t, h, key)) return FALSE; } + if (g->desc.no_loop && (t == h)) /* simple graphs */ + return FALSE; return TRUE; }