@@ -, +, @@
---
dlls/kernelbase/memory.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/dlls/kernelbase/memory.c
+++ a/dlls/kernelbase/memory.c
@@ -481,7 +481,9 @@ BOOL WINAPI DECLSPEC_HOTPATCH VirtualLock( void *addr, SIZE_T size )
*/
BOOL WINAPI DECLSPEC_HOTPATCH VirtualProtect( void *addr, SIZE_T size, DWORD new_prot, DWORD *old_prot )
{
- return VirtualProtectEx( GetCurrentProcess(), addr, size, new_prot, old_prot );
+ BOOL ret = VirtualProtectEx( GetCurrentProcess(), addr, size, new_prot, old_prot );
+ if (*old_prot == PAGE_WRITECOPY) *old_prot = PAGE_READWRITE;
+ return ret;
}
--
|