]> granicus.if.org Git - graphviz/commitdiff
an assert in applyattrs() is too restrictive when setting edge [key=something}
authorStephen C North <scnorth@gmail.com>
Tue, 24 Dec 2019 02:18:13 +0000 (21:18 -0500)
committerStephen C North <scnorth@gmail.com>
Tue, 24 Dec 2019 02:18:13 +0000 (21:18 -0500)
as the object tag can be AGINEDGE not AGEDGE==AGOUTEDGE so we changed that

lib/cgraph/grammar.y

index 127a7241a3a91586fc0f8e7f777d76856e37499e..2507c12430a783e99be1475b3166685bf15907ce 100644 (file)
@@ -318,7 +318,8 @@ static void applyattrs(void *obj)
                        }
                }
                else {
-                       assert(AGTYPE(obj) == AGEDGE);
+                       /* assert(AGTYPE(obj) == AGEDGE);  surprising this fails */
+                       assert((AGTYPE(obj) == AGINEDGE) || (AGTYPE(obj) == AGOUTEDGE));
                        assert(aptr->tag == T_atom);
                        assert(streq(aptr->u.name,Key));
                }