From 6b0f5bbc02427ffe5cf241bc932bf6f6ff7ab7e0 Mon Sep 17 00:00:00 2001 From: dankmeme01 <42031238+dankmeme01@users.noreply.github.com> Date: Sat, 27 Apr 2024 22:03:39 +0200 Subject: [PATCH] add protect --- src/Handler.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Handler.cpp b/src/Handler.cpp index cf1f3cf..89cac47 100644 --- a/src/Handler.cpp +++ b/src/Handler.cpp @@ -55,6 +55,7 @@ Result<> Handler::init() { auto target = m_modifiedBytes.size(); auto address = reinterpret_cast(Target::get().getRealPtr(m_address)); + Target::get().protectMemory(address, target, VM_PROT_READ | VM_PROT_EXECUTE); m_originalBytes.insert(m_originalBytes.begin(), address, address + target); TULIP_HOOK_UNWRAP_INTO(auto trampolineOffset, generator->relocateOriginal(target));