From 29e991a25bd6b4ededb73aaa453c87f80c026539 Mon Sep 17 00:00:00 2001 From: PMheart <17109513+PMheart@users.noreply.github.com> Date: Mon, 10 Jul 2023 15:28:29 +0200 Subject: [PATCH] Revert "Remove redundant logging, thanks @mhaeuser" This reverts commit e03f93044fd1f44d13233f7300d300770162a83f. --- Lilu/Sources/kern_patcher.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Lilu/Sources/kern_patcher.cpp b/Lilu/Sources/kern_patcher.cpp index c69fa817..a2a66876 100644 --- a/Lilu/Sources/kern_patcher.cpp +++ b/Lilu/Sources/kern_patcher.cpp @@ -649,8 +649,10 @@ bool KernelPatcher::findPattern(const void *pattern, const void *patternMask, si } bool KernelPatcher::findAndReplaceWithMask(void *data, size_t dataSize, const void *find, size_t findSize, const void *findMask, size_t findMaskSize, const void *replace, size_t replaceSize, const void *replaceMask, size_t replaceMaskSize, size_t count, size_t skip) { - if (dataSize < findSize) return false; - + if (dataSize < findSize) { + SYSLOG("patcher", "data size must not exceed find size!"); + return false; + } if (findSize < replaceSize) { SYSLOG("patcher", "find size must be larger or equivalent to repl size!"); return false;