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/patcher.h | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'src/core/patcher.h') diff --git a/src/core/patcher.h b/src/core/patcher.h index 3dfbb05c..2722b6fd 100644 --- a/src/core/patcher.h +++ b/src/core/patcher.h @@ -117,16 +117,10 @@ Nop(AT address, unsigned int nCount) Unprotect_internal(); } -template inline void -InjectHook(AT address, HT hook, unsigned int nType=PATCH_NOTHING) +template inline void +InjectHook(uintptr_t address, T hook, unsigned int nType = PATCH_NOTHING) { - uint32 uiHook; - _asm - { - mov eax, hook - mov uiHook, eax - } - InjectHook_internal((uint32)address, uiHook, nType); + InjectHook_internal(address, reinterpret_cast((void *&)hook), nType); } inline void ExtractCall(void *dst, uint32_t a) -- cgit v1.2.3