0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-29 18:22:50 +01:00

modules: using labs() for date math is unsafe

This commit is contained in:
William Pitcock 2016-03-08 13:46:19 -06:00
parent d2e0b78f6c
commit 3089f59c10

View file

@ -915,7 +915,7 @@ load_a_module(const char *path, int warn, int origin, int core)
*/
if(mheader->mapi_datecode != datecode && mheader->mapi_datecode > 0)
{
long int delta = labs(datecode - mheader->mapi_datecode);
long int delta = datecode - mheader->mapi_datecode;
if (delta > MOD_WARN_DELTA)
{
delta /= 86400;