From: Mathias Kettner Date: Thu, 23 Oct 2014 21:48:52 +0000 (+0200) Subject: fix graph regressions X-Git-Tag: v1.5.0-rc1~21^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7b4285e6a88fbedf81ad12ea5fc3b30b753da37f;p=thirdparty%2Frrdtool-1.x.git fix graph regressions --- diff --git a/src/rrd_graph_helper.c b/src/rrd_graph_helper.c index 69d379b4..ea0176db 100644 --- a/src/rrd_graph_helper.c +++ b/src/rrd_graph_helper.c @@ -817,7 +817,7 @@ int parse_xport(enum gf_en,parsedargs_t*,image_desc_t *const); void legend_shift(char *legend); void legend_shift(char *legend) { - if (!legend) { return; } + if (!legend || !legend[0]) { return; } memmove(legend+2,legend,strlen(legend)); legend[0]=' '; legend[1]=' '; @@ -1127,6 +1127,9 @@ int parse_hvrule(enum gf_en gf,parsedargs_t*pa,image_desc_t *const im){ dprintf("YAXIS : %i\n",gdp->yaxisidx); dprintf("=================================\n"); + /* shift the legend by 2 spaces for the "coloured-box"*/ + legend_shift(gdp->legend); + /* check that vidx is of type VDEF */ if (gdp->vidx != -1 && im->gdes[gdp->vidx].gf != GF_VDEF) { rrd_set_error("Using vname %s of wrong type in line %s\n",