Project

General

Profile

Bug #10144 ยป tv_nsec-overflow.patch

normalperson (Eric Wong), 08/16/2014 01:19 AM

View differences:

time.c
d = modf(RFLOAT_VALUE(num), &f);
if (d >= 0) {
t.tv_nsec = (int)(d*1e9+0.5);
if (t.tv_nsec >= 1000000000) {
t.tv_nsec -= 1000000000;
f += 1;
}
}
else if ((t.tv_nsec = (int)(-d*1e9+0.5)) > 0) {
t.tv_nsec = 1000000000 - t.tv_nsec;
    (1-1/1)