fix type conversion error (on windows) unsigned/signed affecting timestamps on rrd_dump.
[rrdtool.git] / src / rrd_dump.c
index 82bc81e..b23da23 100644 (file)
@@ -394,7 +394,7 @@ static int rrd_dump_opt_r(
         rrd_seek(rrd_file, (rra_start + (rrd.rra_ptr[i].cur_row + 1)
                             * rrd.stat_head->ds_cnt
                             * sizeof(rrd_value_t)), SEEK_SET);
-        timer = -(rrd.rra_def[i].row_cnt - 1);
+        timer = -(long)(rrd.rra_def[i].row_cnt - 1);
         ii = rrd.rra_ptr[i].cur_row;
         for (ix = 0; ix < rrd.rra_def[i].row_cnt; ix++) {
             ii++;