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=eee1bc37af26b04134534c99752f92eb7d768fc5;p=rrdtool-all.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@287 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/program/src/rrd_graph.c b/program/src/rrd_graph.c index 9597daff..6d919549 100644 --- a/program/src/rrd_graph.c +++ b/program/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); } } }