Skip to content

Commit de223c1

Browse files
committed
Fix for mpr_time-double arithmetic.
1 parent 444c2c6 commit de223c1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/time.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ void mpr_time_add_dbl(mpr_time *t, double d)
7373
return;
7474

7575
d += (double)t->frac * multiplier;
76-
if (d < 0 && floor(d) > t->sec)
76+
if (d < 0 && fabs(floor(d)) > t->sec)
7777
t->sec = t->frac = 0;
7878
else {
7979
t->sec += floor(d);

0 commit comments

Comments
 (0)