From 20d7bd28bbb7c09e5b277aacf43605eb2f65f285 Mon Sep 17 00:00:00 2001 From: Eduardo Bragatto Date: Mon, 17 Nov 2014 22:01:20 -0200 Subject: [PATCH] Fixed ending time as well (behaviour was different but corner case was the same: when start ou end times were exact multiples of step) --- src/rrd_xport.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/rrd_xport.c b/src/rrd_xport.c index adc4078c..3daffa2b 100644 --- a/src/rrd_xport.c +++ b/src/rrd_xport.c @@ -289,7 +289,10 @@ int rrd_xport_fn( if ( im->start > *start ) { *start = *start + *step; } - *end = im->end - im->end % (*step) + (*step); + *end = im->end - im->end % (*step); + if ( im->end > *end ) { + *end = *end + *step; + } /* room for rearranged data */ -- 2.47.2