From 44c8e4f94c8c3733bf1578b17507beaab98d9d4c Mon Sep 17 00:00:00 2001 From: Akash Mozumdar Date: Sat, 1 Jan 2022 21:29:13 -0700 Subject: [PATCH] be more careful inserting waffle --- texthook/engine/engine.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/texthook/engine/engine.cc b/texthook/engine/engine.cc index 0bf7d7d..07e46d6 100644 --- a/texthook/engine/engine.cc +++ b/texthook/engine/engine.cc @@ -5984,7 +5984,7 @@ bool InsertWaffleHook() { bool found = false; for (DWORD i = processStartAddress + 0x1000; i < processStopAddress - 4; i++) - if (*(DWORD *)i == 0xac68) { + if (*(DWORD *)i == 0xac68 && *(BYTE*)(i + 4) == 0) { HookParam hp = {}; hp.address = i; hp.length_offset = 1;