From 4d1bef4a9748a75bacae8c858a9c87aae58b838c Mon Sep 17 00:00:00 2001 From: Stephen C North Date: Tue, 26 Nov 2019 15:47:38 -0500 Subject: [PATCH] Attempted fix for https://gitlab.com/graphviz/graphviz/issues/1631 Stand-alone attributes within subgraphs are incorrectly handled for dot/canon/xdot output files. Fix is to access local dictionary, not root, when writing nodes within subgraphs. --- lib/cgraph/write.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cgraph/write.c b/lib/cgraph/write.c index e860849b1..60ca4d697 100644 --- a/lib/cgraph/write.c +++ b/lib/cgraph/write.c @@ -634,7 +634,7 @@ static int write_body(Agraph_t * g, iochan_t * ofile) /* has_attr = (agattrrec(g) != NIL(Agattr_t*)); */ CHKRV(write_subgs(g, ofile)); - dd = agdatadict(agroot(g), FALSE); + dd = agdatadict(g, FALSE); for (n = agfstnode(g); n; n = agnxtnode(g, n)) { if (write_node_test(g, n, AGSEQ(n))) CHKRV(write_node(n, ofile, dd ? dd->dict.n : 0)); -- 2.50.1