From 1a10f625d96c4c244021db2ae47557cee4947b94 Mon Sep 17 00:00:00 2001 From: Julian Xhokaxhiu Date: Wed, 18 Jan 2023 18:37:09 +0100 Subject: [PATCH] Common: Unload FFNx replaced functions on detach --- src/common.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/common.cpp b/src/common.cpp index ea5277fd..e59cf209 100644 --- a/src/common.cpp +++ b/src/common.cpp @@ -2967,6 +2967,10 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) // Apply hext patching hextPatcher.applyAll(); } + else if (fdwReason == DLL_PROCESS_DETACH) + { + unreplace_functions(); + } return TRUE; }