]> granicus.if.org Git - graphviz/commitdiff
Attempted fix for https://gitlab.com/graphviz/graphviz/issues/1631
authorStephen C North <scnorth@gmail.com>
Tue, 26 Nov 2019 20:47:38 +0000 (15:47 -0500)
committerStephen C North <scnorth@gmail.com>
Tue, 26 Nov 2019 20:47:38 +0000 (15:47 -0500)
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

index e860849b1c038a9e2d3e67ca7192ce4852b4d533..60ca4d6973b4b42dc0e93916a7e3a9758ed90263 100644 (file)
@@ -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));