From 4dab052f2c57d16e4a350f2d146c58fe633456a9 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 32de7df..3e030b8 100644 --- a/src/Handler.cpp +++ b/src/Handler.cpp @@ -54,6 +54,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));