diff --git a/Source/Windows/Common/OvercommitTracker.h b/Source/Windows/Common/OvercommitTracker.h index 63a707cd6c..797c4c7481 100644 --- a/Source/Windows/Common/OvercommitTracker.h +++ b/Source/Windows/Common/OvercommitTracker.h @@ -38,7 +38,7 @@ class OvercommitTracker { if (IsWine) { MEMORY_BASIC_INFORMATION Info; NtQueryVirtualMemory(NtCurrentProcess(), reinterpret_cast(FaultAddress), MemoryBasicInformation, &Info, sizeof(Info), nullptr); - const auto CommitSize = reinterpret_cast(Info.BaseAddress) + Info.RegionSize - FaultAddress; + const auto CommitSize = reinterpret_cast(Info.BaseAddress) + Info.RegionSize - reinterpret_cast(Info.AllocationBase); VirtualAlloc(reinterpret_cast(Info.AllocationBase), CommitSize, MEM_COMMIT, PAGE_READWRITE); } else { static constexpr size_t MaxFaultCommitSize = 1024 * 64;