From: Tobias 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-Tag: 1.2rc1~47 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b85bba48034e8e1b4594e675440fbca096fb358c;p=thirdparty%2Frrdtool-1.x.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 9597daff..6d919549 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); } } }