diff --git a/cameo/gnuplot.c b/cameo/gnuplot.c index 566567b..d02e8e0 100644 --- a/cameo/gnuplot.c +++ b/cameo/gnuplot.c @@ -88,7 +88,8 @@ static int gnuplot_do_write(FILE *file, const struct path *paths) if (path != paths) if (fprintf(file, "\n") < 0) return 0; - if (fprintf(file, "#%%r_tool=%f\n", path->r_tool) < 0) + if (path->r_tool && + fprintf(file, "#%%r_tool=%f\n", path->r_tool) < 0) return 0; if (path->outside && fprintf(file, "#%%outside\n") < 0) return 0;