From 16a28afa0aee12ecf2e74830bb2c7cd94f71277c Mon Sep 17 00:00:00 2001 From: Mathew Tkachuk Date: Sat, 15 Mar 2025 02:15:04 +0300 Subject: [PATCH] fix: Fix MetaXRAudioWwise patch --- .../src/commonMain/kotlin/moe/crx/ovrport/patch/Patch.kt | 9 +++++++-- .../kotlin/moe/crx/ovrport/patch/PatchStore.kt | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/composeApp/src/commonMain/kotlin/moe/crx/ovrport/patch/Patch.kt b/composeApp/src/commonMain/kotlin/moe/crx/ovrport/patch/Patch.kt index 465b371..b243595 100644 --- a/composeApp/src/commonMain/kotlin/moe/crx/ovrport/patch/Patch.kt +++ b/composeApp/src/commonMain/kotlin/moe/crx/ovrport/patch/Patch.kt @@ -38,7 +38,12 @@ class FileTransformer(val file: File) { var matches = true for (j in i..= inputBytes.size) { + break + } + + if (inputBytes[checkIndex] != "??" && bytes[j].toUByte() != inputBytes[checkIndex].toUByte(16)) { matches = false break } @@ -46,7 +51,7 @@ class FileTransformer(val file: File) { if (matches) { val replaced = bytes.slice(0..