From 7b4285e6a88fbedf81ad12ea5fc3b30b753da37f Mon Sep 17 00:00:00 2001 From: Mathias Kettner Date: Thu, 23 Oct 2014 23:48:52 +0200 Subject: [PATCH] fix graph regressions --- src/rrd_graph_helper.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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", -- 2.47.2