summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 88dd35b)
raw | patch | inline | side by side (parent: 88dd35b)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Tue, 22 Nov 2011 12:59:57 +0000 (12:59 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Tue, 22 Nov 2011 12:59:57 +0000 (12:59 +0000) |
program/src/rrd_rpncalc.c | patch | blob | history |
index 4cb177ddea016379374199515bc0cf0f43ca23cd..25f528414f62217b356f3dc66319d06eef48d6c4 100644 (file)
time_t dur = (time_t) rpnstack->s[stptr];
time_t step = (time_t) rpnp[rpi - 2].step;
- if (output_idx > (int) ceil((float) dur / (float) step)) {
+ if (output_idx + 1 >= (int) ceil((float) dur / (float) step)) {
int ignorenan = (rpnp[rpi].op == OP_TREND);
double accum = 0.0;
int i = 0;