[KERNEL] Do not convert time if provided time_ptr is invalid (Fixes Dark Souls crash)
This commit is contained in:
parent
5079dec872
commit
c6a73a2f9a
|
@ -512,6 +512,9 @@ static_assert(sizeof(X_TIME_FIELDS) == 16, "Must be LARGEINTEGER");
|
|||
// https://support.microsoft.com/en-us/kb/167296
|
||||
void RtlTimeToTimeFields(lpqword_t time_ptr,
|
||||
pointer_t<X_TIME_FIELDS> time_fields_ptr) {
|
||||
if (!time_ptr.value())
|
||||
return;
|
||||
|
||||
int64_t time_ms = time_ptr.value() / 10000 - 11644473600000LL;
|
||||
time_t timet = time_ms / 1000;
|
||||
struct tm* tm = gmtime(&timet);
|
||||
|
|
Loading…
Reference in New Issue