Replaced gmtime with gmtime_r

This commit is contained in:
akallabeth 2020-05-25 14:07:31 +02:00 committed by Armin Novak
parent 1a02af5a12
commit a45afe9db7

View File

@ -213,11 +213,12 @@ void GetNativeSystemInfo(LPSYSTEM_INFO lpSystemInfo)
void GetSystemTime(LPSYSTEMTIME lpSystemTime) void GetSystemTime(LPSYSTEMTIME lpSystemTime)
{ {
time_t ct = 0; time_t ct = 0;
struct tm tres;
struct tm* stm = NULL; struct tm* stm = NULL;
WORD wMilliseconds = 0; WORD wMilliseconds = 0;
ct = time(NULL); ct = time(NULL);
wMilliseconds = (WORD)(GetTickCount() % 1000); wMilliseconds = (WORD)(GetTickCount() % 1000);
stm = gmtime(&ct); stm = gmtime_r(&ct, &tres);
ZeroMemory(lpSystemTime, sizeof(SYSTEMTIME)); ZeroMemory(lpSystemTime, sizeof(SYSTEMTIME));
if (stm) if (stm)