]> granicus.if.org Git - graphviz/commitdiff
Fix bug 552
authorerg <devnull@localhost>
Fri, 9 Apr 2010 20:57:40 +0000 (20:57 +0000)
committererg <devnull@localhost>
Fri, 9 Apr 2010 20:57:40 +0000 (20:57 +0000)
lib/common/output.c

index 3c9f805d4f719440ed3663f3a0e4fc5ed5d3a303..2ea84ee33ae84ab7ab7148467081fb817743adfe 100644 (file)
@@ -125,6 +125,7 @@ void write_plain(GVJ_t * job, graph_t * g, FILE * f, boolean extend)
     bezier bz;
     pointf pt;
     char *lbl;
+    char* fillcolor;
 
 #ifdef WITH_CGRAPH
     putstr = g->clos->disc.io->putstr;
@@ -155,7 +156,10 @@ void write_plain(GVJ_t * job, graph_t * g, FILE * f, boolean extend)
        printstring(f, " ", late_nnstring(n, N_style, "solid"));
        printstring(f, " ", ND_shape(n)->name);
        printstring(f, " ", late_nnstring(n, N_color, DEFAULT_COLOR));
-       printstring(f, " ", late_nnstring(n, N_fillcolor, DEFAULT_FILL));
+       fillcolor = late_nnstring(n, N_fillcolor, "");
+        if (fillcolor[0] == '\0')
+           fillcolor = late_nnstring(n, N_color, DEFAULT_FILL);
+       printstring(f, " ", fillcolor);
        agputc('\n', f);
     }
     for (n = agfstnode(g); n; n = agnxtnode(g, n)) {