From d5b4c99c00272e3e5afec2fa0a489ba618f2a81a Mon Sep 17 00:00:00 2001 From: Lucaskyy Date: Sun, 20 Mar 2022 22:49:28 +0100 Subject: [PATCH] fix: set index for insertAt to 0 by default --- src/main/kotlin/net/revanced/patcher/writer/ASMWriter.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/net/revanced/patcher/writer/ASMWriter.kt b/src/main/kotlin/net/revanced/patcher/writer/ASMWriter.kt index cb9e83f0..df56a3cb 100644 --- a/src/main/kotlin/net/revanced/patcher/writer/ASMWriter.kt +++ b/src/main/kotlin/net/revanced/patcher/writer/ASMWriter.kt @@ -7,7 +7,7 @@ object ASMWriter { fun InsnList.setAt(index: Int, node: AbstractInsnNode) { this[this.get(index)] = node } - fun InsnList.insertAt(index: Int, vararg nodes: AbstractInsnNode) { + fun InsnList.insertAt(index: Int = 0, vararg nodes: AbstractInsnNode) { this.insert(this.get(index), nodes.toInsnList()) }