]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
Fix off-by-one error when adding a new RRA
authorPeter Stamfest <peter@stamfest.at>
Sun, 2 Mar 2014 23:59:23 +0000 (00:59 +0100)
committerPeter Stamfest <peter@stamfest.at>
Mon, 3 Mar 2014 07:26:19 +0000 (08:26 +0100)
src/rrd_modify.c

index 3db5411bde364c7105921eff8c35697f00fd7014..6647d60c05e1ffba915f5c19c523426dd24213ff 100644 (file)
@@ -969,7 +969,7 @@ static int add_rras(const rrd_t *in, rrd_t *out, const int *ds_map,
            init_cdp(out, rra_def, cdp_prep);
        }
 
-       out->rra_ptr[last_rra_cnt].cur_row = 0;
+       out->rra_ptr[last_rra_cnt].cur_row = rra_def->row_cnt - 1;
 
        // extend and fill rrd_value array...