X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Frrd_graph.c;h=aae131708b4cf5c483d53c72c6615180f973f3d7;hb=c4f7117a983147777138266b669b9d72dfe20fb6;hp=0f6debdb5f8e4122c2a16ba61d7023d53c984e6b;hpb=a6d79528b4812e8eb3927dba3cdd42e6ca51b287;p=rrdtool.git diff --git a/src/rrd_graph.c b/src/rrd_graph.c index 0f6debd..aae1317 100644 --- a/src/rrd_graph.c +++ b/src/rrd_graph.c @@ -1,5 +1,5 @@ /**************************************************************************** - * RRDtool 1.2.22 Copyright by Tobi Oetiker, 1997-2007 + * RRDtool 1.2.23 Copyright by Tobi Oetiker, 1997-2007 **************************************************************************** * rrd__graph.c produce graphs from data in rrdfiles ****************************************************************************/ @@ -1673,8 +1673,8 @@ int draw_horizontal_grid(image_desc_t *im) for (i = sgrid; i <= egrid; i++){ double Y0=ytr(im,im->ygrid_scale.gridstep*i); double YN=ytr(im,im->ygrid_scale.gridstep*(i+1)); - if ( Y0 >= im->yorigin-im->ysize - && Y0 <= im->yorigin){ + if ( round(Y0) >= im->yorigin-im->ysize + && round(Y0) <= im->yorigin){ /* Make sure at least 2 grid labels are shown, even if it doesn't agree with the chosen settings. Add a label if required by settings, or if there is only one label so far and the next grid line is out of bounds. */