Merge pull request #5721 from lioncash/win

AllocatorHooks: Amend VirtualProtect for Windows
This commit is contained in:
Ryan Houdek authored and GitHub committed 2026-07-11 20:49:16 -07:00
commit 12baceb859
1 file changed
+2 -1
@@ -97,7 +97,8 @@ inline bool VirtualProtect(void* Ptr, size_t Size, ProtectOptions options) {
LOGMAN_MSG_A_FMT("Unknown VirtualProtect options combination");
}
return ::VirtualProtect(Ptr, Size, prot, nullptr) == 0;
DWORD OldProt {};
return ::VirtualProtect(Ptr, Size, prot, &OldProt) != 0;
}
FEX_DEFAULT_VISIBILITY extern VirtualNamePtr VirtualName;