diff --git a/texthook/engine/engine.cc b/texthook/engine/engine.cc index 385a156b..c4bd6c24 100644 --- a/texthook/engine/engine.cc +++ b/texthook/engine/engine.cc @@ -8211,6 +8211,8 @@ bool InsertPensilHook() for (DWORD i = processStartAddress; i < processStopAddress - 4; i++) if (*(DWORD *)i == 0x6381) // cmp *,8163 if (DWORD j = SafeFindEntryAligned(i, 0x100)) { + // Artikash 7/20/2019: I don't understand how or why this is possible, but I found a game that by default has copy on write memory for its .text section + VirtualProtect((void*)j, 1, PAGE_EXECUTE_READ, DUMMY); HookParam hp = {}; hp.address = j; hp.offset = 8;