Check if the function is already patched before updating the addresses

This commit is contained in:
Maschell 2023-01-01 15:37:27 +01:00
parent f94b857f12
commit 182c6d2f92
1 changed files with 3 additions and 3 deletions

View File

@ -31,12 +31,12 @@ static void writeDataAndFlushIC(CThread *thread, void *arg) {
}
bool PatchFunction(std::shared_ptr<PatchedFunctionData> &patchedFunction) {
// The addresses of a function might change every time with run another application.
if (!patchedFunction->updateFunctionAddresses()) {
if (patchedFunction->isPatched) {
return true;
}
if (patchedFunction->isPatched) {
// The addresses of a function might change every time with run another application.
if (!patchedFunction->updateFunctionAddresses()) {
return true;
}