Code

added patch suggested by Lars Johannesen
[rrdtool-all.git] / contrib / php4 / rrdtool.c
index d718cc1d7f51810a88a1be1714f374ef5ec6daf0..c91bc7fbeb8b56b61774af43fa6928271c7b89cc 100644 (file)
@@ -299,7 +299,7 @@ PHP_FUNCTION(rrd_fetch)
                        {
                                datap = data;
  
-                               for (i = start; i <= end; i += step)
+                               for (i = start + step; i <= end; i += step)
                                        for (j = 0; j < ds_cnt; j++)
                                                add_next_index_double(p_data, *(datap++));