From 48683e167ea59a38fbcc1522ec53cc43d90f2678 Mon Sep 17 00:00:00 2001 From: Maschell Date: Fri, 29 May 2020 19:27:55 +0200 Subject: [PATCH] Add flush after patching the functions --- source/PluginManagement.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/PluginManagement.cpp b/source/PluginManagement.cpp index 5854f1a..d7df5e5 100644 --- a/source/PluginManagement.cpp +++ b/source/PluginManagement.cpp @@ -148,6 +148,9 @@ void PluginManagement::PatchFunctionsAndCallHooks(plugin_information_t *gPluginI PatchInvidualMethodHooks(method_hooks_hooks_static, method_hooks_size_hooks_static, method_calls_hooks_static); PatchInvidualMethodHooks(method_hooks_hooks, method_hooks_size_hooks, method_calls_hooks); + DCFlushRange((void *) 0x00800000, 0x00800000); + ICInvalidateRange((void *) 0x00800000, 0x00800000); + for (int32_t plugin_index = 0; plugin_index < gPluginInformation->number_used_plugins; plugin_index++) { CallHookEx(gPluginInformation, WUPS_LOADER_HOOK_INIT_WUT_MALLOC, plugin_index); CallHookEx(gPluginInformation, WUPS_LOADER_HOOK_INIT_WUT_NEWLIB, plugin_index);