Update hook.hpp

master
xerox 5 years ago
parent 6db95b0b17
commit 6ceceb28b2

@ -39,7 +39,7 @@ namespace hook
static void write_to_readonly(void* addr, void* data, int size)
{
DWORD old_flags;
VirtualProtect((LPVOID)addr, size, PAGE_READWRITE, &old_flags);
VirtualProtect((LPVOID)addr, size, PAGE_EXECUTE_READWRITE, &old_flags);
memcpy((void*)addr, data, size);
VirtualProtect((LPVOID)addr, size, old_flags, &old_flags);
}

Loading…
Cancel
Save