Prevent sanitizer warning in os.time().
Reported by Sergey Bronnikov. #1454
This commit is contained in:
parent
e4c7d8b380
commit
86d414f5ca
@ -234,8 +234,8 @@ LJLIB_CF(os_time)
|
|||||||
ts.tm_min = getfield(L, "min", 0);
|
ts.tm_min = getfield(L, "min", 0);
|
||||||
ts.tm_hour = getfield(L, "hour", 12);
|
ts.tm_hour = getfield(L, "hour", 12);
|
||||||
ts.tm_mday = getfield(L, "day", -1);
|
ts.tm_mday = getfield(L, "day", -1);
|
||||||
ts.tm_mon = getfield(L, "month", -1) - 1;
|
ts.tm_mon = (int)((unsigned int)getfield(L, "month", -1) - 1u);
|
||||||
ts.tm_year = getfield(L, "year", -1) - 1900;
|
ts.tm_year = (int)((unsigned int)getfield(L, "year", -1) - 1900u);
|
||||||
ts.tm_isdst = getboolfield(L, "isdst");
|
ts.tm_isdst = getboolfield(L, "isdst");
|
||||||
t = mktime(&ts);
|
t = mktime(&ts);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user