mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-27 08:45:00 +01:00
Check result of FileTimeToLocalFileTime; add to changelog.
This commit is contained in:
@@ -329,20 +329,18 @@ time_t platform_file_get_modified_time(const utf8* path)
|
||||
BOOL result = GetFileAttributesExW(wPath, GetFileExInfoStandard, &data);
|
||||
free(wPath);
|
||||
|
||||
if (result)
|
||||
{
|
||||
FILETIME localFileTime;
|
||||
FileTimeToLocalFileTime(&data.ftLastWriteTime, &localFileTime);
|
||||
|
||||
ULARGE_INTEGER ull;
|
||||
ull.LowPart = localFileTime.dwLowDateTime;
|
||||
ull.HighPart = localFileTime.dwHighDateTime;
|
||||
return ull.QuadPart / 10000000ULL - 11644473600ULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!result)
|
||||
return 0;
|
||||
}
|
||||
|
||||
FILETIME localFileTime;
|
||||
result = FileTimeToLocalFileTime(&data.ftLastWriteTime, &localFileTime);
|
||||
if (!result)
|
||||
return 0;
|
||||
|
||||
ULARGE_INTEGER ull;
|
||||
ull.LowPart = localFileTime.dwLowDateTime;
|
||||
ull.HighPart = localFileTime.dwHighDateTime;
|
||||
return ull.QuadPart / 10000000ULL - 11644473600ULL;
|
||||
}
|
||||
|
||||
uint8_t platform_get_locale_currency()
|
||||
|
||||
Reference in New Issue
Block a user