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 oSumAtrIX
parent 4dd820ffdf
commit d5b4c99c00
No known key found for this signature in database
GPG key ID: A9B3094ACDB604B4

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