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