From: oetiker Date: Sat, 7 Aug 2004 23:46:35 +0000 (+0000) Subject: when moving the data pointers we should take into account how fahr off they X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=83e524e933e6b5f3175e57d460cd2e19b4350864;p=rrdtool.git when moving the data pointers we should take into account how fahr off they are. Found by David M. Grimes git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@287 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/src/rrd_graph.c b/src/rrd_graph.c index 9597daf..6d91954 100644 --- a/src/rrd_graph.c +++ b/src/rrd_graph.c @@ -913,7 +913,8 @@ data_calc( image_desc_t *im){ im->gdes[gdi].rpnp[rpi].op == OP_PREV_OTHER){ long ptr = im->gdes[gdi].rpnp[rpi].ptr; if(im->gdes[gdi].start > im->gdes[ptr].start) { - im->gdes[gdi].rpnp[rpi].data += im->gdes[gdi].rpnp[rpi].ds_cnt; + im->gdes[gdi].rpnp[rpi].data += im->gdes[gdi].rpnp[rpi].ds_cnt + * ((im->gdes[gdi].start - im->gdes[ptr].start) / im->gdes[ptr].step); } } }