fix: set index for insertAt to 0 by default

This commit is contained in:
Lucaskyy 2022-03-20 22:49:28 +01:00 committed by she11sh0cked
parent 6c0f0823c9
commit 1769132a9e

View file

@ -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())
}