Code

rrdtool.fetch is returning an extra, bogus, data point. Attached is a
authoroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Thu, 19 Jun 2008 13:18:04 +0000 (13:18 +0000)
committeroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Thu, 19 Jun 2008 13:18:04 +0000 (13:18 +0000)
patch to correct this. - Gilad Raphaelli. Fix for #161

git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@1436 a5681a0c-68f1-0310-ab6d-d61299d08faa

bindings/python/rrdtoolmodule.c

index 497059d2792245fc1e10ec2d0754a1ea96733f7a..1fe4c0ca8d538d2c5541f0bae591f9671133c549 100644 (file)
@@ -175,7 +175,7 @@ PyRRD_fetch(PyObject UNUSED(*self), PyObject *args)
         unsigned long          i, j, row;
         rrd_value_t  dv;
 
-        row = ((end - start) / step + 1);
+        row = (end - start) / step;
 
         r = PyTuple_New(3);
         range_tup = PyTuple_New(3);