Fix broken VirtualProtect reset on ClearWriteWatch.

This commit is contained in:
Ben Vanik 2015-02-02 11:58:31 -08:00
parent bba8f6391b
commit f9a3f0c48e
1 changed files with 1 additions and 1 deletions

View File

@ -116,7 +116,7 @@ uintptr_t MMIOHandler::AddWriteWatch(uint32_t guest_address, size_t length,
void MMIOHandler::ClearWriteWatch(WriteWatchEntry* entry) {
auto host_address = mapping_base_ + entry->address;
DWORD old_protect;
VirtualProtect(host_address, entry->length, PAGE_READWRITE, nullptr);
VirtualProtect(host_address, entry->length, PAGE_READWRITE, &old_protect);
VirtualProtect(host_address + 0xA0000000, entry->length, PAGE_READWRITE,
&old_protect);
VirtualProtect(host_address + 0xC0000000, entry->length, PAGE_READWRITE,