diff --git a/src/main/kotlin/app/revanced/patcher/extensions/Extensions.kt b/src/main/kotlin/app/revanced/patcher/extensions/Extensions.kt index 723c377..f828631 100644 --- a/src/main/kotlin/app/revanced/patcher/extensions/Extensions.kt +++ b/src/main/kotlin/app/revanced/patcher/extensions/Extensions.kt @@ -39,7 +39,7 @@ fun MutableMethodImplementation.replaceInstructions(index: Int, instructions: Li } fun MutableMethodImplementation.removeInstructions(index: Int, count: Int) { - for (i in count downTo 0) { + for (i in count - 1 downTo 0) { this.removeInstruction(index + i) } }