From a0b95da11240b4e936e4bab64a002db394130bb0 Mon Sep 17 00:00:00 2001 From: notaz Date: Wed, 3 Jan 2018 03:00:32 +0200 Subject: [PATCH] libretro: pass required arg to VirtualProtect --- platform/libretro/libretro.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platform/libretro/libretro.c b/platform/libretro/libretro.c index 2bdd07d..42d30c2 100644 --- a/platform/libretro/libretro.c +++ b/platform/libretro/libretro.c @@ -451,7 +451,8 @@ int plat_mem_set_exec(void *ptr, size_t size) { int ret = -1; #ifdef _WIN32 - ret = VirtualProtect(ptr, size, PAGE_EXECUTE_READWRITE, 0); + DWORD oldProtect = 0; + ret = VirtualProtect(ptr, size, PAGE_EXECUTE_READWRITE, &oldProtect); if (ret == 0 && log_cb) log_cb(RETRO_LOG_ERROR, "VirtualProtect(%p, %d) failed: %d\n", ptr, (int)size, GetLastError()); -- 2.39.2