summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e99b152)
raw | patch | inline | side by side (parent: e99b152)
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) |
src/rrd_rpncalc.c | patch | blob | history |
diff --git a/src/rrd_rpncalc.c b/src/rrd_rpncalc.c
index c1a61c205adb8cb5693654df19eacb368e1a4770..8dd224000824adcd496a636de3dde210c81123ed 100644 (file)
--- a/src/rrd_rpncalc.c
+++ b/src/rrd_rpncalc.c
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;