From 184a80cc3b7ecd054f09ec5519fded5fb4efa162 Mon Sep 17 00:00:00 2001 From: Filip Gawin Date: Fri, 27 Mar 2020 21:20:28 +0100 Subject: Remove assembly from patcher.h --- src/core/re3.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/re3.cpp') diff --git a/src/core/re3.cpp b/src/core/re3.cpp index 137a890c..ffb2a7a2 100644 --- a/src/core/re3.cpp +++ b/src/core/re3.cpp @@ -71,7 +71,7 @@ InjectHook_internal(uint32 address, uint32 hook, int type) break; } - *(ptrdiff_t*)(address + 1) = hook - address - 5; + *(ptrdiff_t*)(address + 1) = (uintptr_t)hook - (uintptr_t)address - 5; if(type == PATCH_NOTHING) VirtualProtect((void*)(address + 1), 4, protect[0], &protect[1]); else -- cgit v1.2.3