From 49ca3290a726cdba7bc9b62ffcd8d46e6f04778e Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Tue, 6 May 2025 09:09:54 -0300 Subject: [PATCH] fix: Fix incorrect fingerprints (#4917) --- patches/src/main/kotlin/app/revanced/util/BytecodeUtils.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/patches/src/main/kotlin/app/revanced/util/BytecodeUtils.kt b/patches/src/main/kotlin/app/revanced/util/BytecodeUtils.kt index 1e711271c..d65a95eaa 100644 --- a/patches/src/main/kotlin/app/revanced/util/BytecodeUtils.kt +++ b/patches/src/main/kotlin/app/revanced/util/BytecodeUtils.kt @@ -504,7 +504,7 @@ fun Method.indexOfFirstInstruction(startIndex: Int = 0, targetOpcode: Opcode): I * @see indexOfFirstInstructionOrThrow */ fun Method.indexOfFirstInstruction(startIndex: Int = 0, filter: Instruction.() -> Boolean): Int { - var instructions = this.implementation!!.instructions + var instructions = this.implementation?.instructions ?: return -1 if (startIndex != 0) { instructions = instructions.drop(startIndex) } @@ -570,7 +570,7 @@ fun Method.indexOfFirstInstructionReversed(startIndex: Int? = null, targetOpcode * @see indexOfFirstInstructionReversedOrThrow */ fun Method.indexOfFirstInstructionReversed(startIndex: Int? = null, filter: Instruction.() -> Boolean): Int { - var instructions = this.implementation!!.instructions + var instructions = this.implementation?.instructions ?: return -1 if (startIndex != null) { instructions = instructions.take(startIndex + 1) }