Skip to content

Commit

Permalink
fix: set index for insertAt to 0 by default
Browse files Browse the repository at this point in the history
  • Loading branch information
Sculas authored and she11sh0cked committed Mar 23, 2022
1 parent 6c0f082 commit 1769132
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/kotlin/net/revanced/patcher/writer/ASMWriter.kt
Expand Up @@ -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())
}

Expand Down

0 comments on commit 1769132

Please sign in to comment.