mirror of https://github.com/OpenRCT2/OpenRCT2.git
Fix NO_RCT2 evaluation in hook.c
This commit is contained in:
parent
76043d4050
commit
f73794e093
|
@ -14,10 +14,10 @@
|
|||
*****************************************************************************/
|
||||
#pragma endregion
|
||||
|
||||
#ifdef NO_RCT2
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#ifndef NO_RCT2
|
||||
|
||||
#ifdef __WINDOWS__
|
||||
#include <windows.h>
|
||||
#else
|
||||
|
@ -202,7 +202,7 @@ static void hookfunc(int address, int newaddress, int stacksize, int registerarg
|
|||
data[i++] = 0xC3; // retn
|
||||
|
||||
#ifdef __WINDOWS__
|
||||
WriteProcessMemory(GetCurrentProcess(), address, data, i, 0);
|
||||
WriteProcessMemory(GetCurrentProcess(), (LPVOID)address, data, i, 0);
|
||||
#else
|
||||
// We own the pages with PROT_WRITE | PROT_EXEC, we can simply just memcpy the data
|
||||
memcpy((void *)address, data, i);
|
||||
|
|
Loading…
Reference in New Issue