Skip to content

Commit 49ca329

Browse files
authored
fix: Fix incorrect fingerprints (#4917)
1 parent bf33b4d commit 49ca329

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

patches/src/main/kotlin/app/revanced/util/BytecodeUtils.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ fun Method.indexOfFirstInstruction(startIndex: Int = 0, targetOpcode: Opcode): I
504504
* @see indexOfFirstInstructionOrThrow
505505
*/
506506
fun Method.indexOfFirstInstruction(startIndex: Int = 0, filter: Instruction.() -> Boolean): Int {
507-
var instructions = this.implementation!!.instructions
507+
var instructions = this.implementation?.instructions ?: return -1
508508
if (startIndex != 0) {
509509
instructions = instructions.drop(startIndex)
510510
}
@@ -570,7 +570,7 @@ fun Method.indexOfFirstInstructionReversed(startIndex: Int? = null, targetOpcode
570570
* @see indexOfFirstInstructionReversedOrThrow
571571
*/
572572
fun Method.indexOfFirstInstructionReversed(startIndex: Int? = null, filter: Instruction.() -> Boolean): Int {
573-
var instructions = this.implementation!!.instructions
573+
var instructions = this.implementation?.instructions ?: return -1
574574
if (startIndex != null) {
575575
instructions = instructions.take(startIndex + 1)
576576
}

0 commit comments

Comments
 (0)