mirror of
https://github.com/2006-Scape/Parabot.git
synced 2026-07-06 16:50:39 +00:00
Final proper callback fix
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
package org.parabot.core.asm.adapters;
|
package org.parabot.core.asm.adapters;
|
||||||
|
|
||||||
|
import java.lang.reflect.Modifier;
|
||||||
|
|
||||||
import org.objectweb.asm.Label;
|
import org.objectweb.asm.Label;
|
||||||
import org.objectweb.asm.Opcodes;
|
import org.objectweb.asm.Opcodes;
|
||||||
import org.objectweb.asm.Type;
|
import org.objectweb.asm.Type;
|
||||||
@@ -43,7 +45,7 @@ public class AddCallbackAdapter implements Injectable, Opcodes {
|
|||||||
inject.add(new LabelNode(l0));
|
inject.add(new LabelNode(l0));
|
||||||
for (int arg : args) {
|
for (int arg : args) {
|
||||||
inject.add(new VarInsnNode(ASMUtils.getLoadOpcode(types[arg]
|
inject.add(new VarInsnNode(ASMUtils.getLoadOpcode(types[arg]
|
||||||
.getDescriptor()), arg));
|
.getDescriptor()), Modifier.isStatic(method.access) ? arg : arg + 1));
|
||||||
}
|
}
|
||||||
inject.add(new MethodInsnNode(INVOKESTATIC,
|
inject.add(new MethodInsnNode(INVOKESTATIC,
|
||||||
this.invokeClass, this.invokeMethod,
|
this.invokeClass, this.invokeMethod,
|
||||||
|
|||||||
Reference in New Issue
Block a user