summaryrefslogtreecommitdiffstats
path: root/src/core/re3.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/re3.cpp')
-rw-r--r--src/core/re3.cpp2
1 files changed, 1 insertions, 1 deletions
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