mirror of
https://github.com/2006-Scape/Parabot.git
synced 2026-07-07 00:38:16 +00:00
Fixed invoker adapter
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.Opcodes;
|
import org.objectweb.asm.Opcodes;
|
||||||
import org.objectweb.asm.tree.ClassNode;
|
import org.objectweb.asm.tree.ClassNode;
|
||||||
import org.objectweb.asm.tree.MethodNode;
|
import org.objectweb.asm.tree.MethodNode;
|
||||||
@@ -39,7 +41,15 @@ public class AddInvokerAdapter implements Opcodes, Injectable {
|
|||||||
|
|
||||||
boolean isStatic = (this.mn.access & ACC_STATIC) != 0;
|
boolean isStatic = (this.mn.access & ACC_STATIC) != 0;
|
||||||
|
|
||||||
mn.access = mn.access | ACC_PUBLIC;
|
if(!Modifier.isPublic(mn.access)) {
|
||||||
|
if(Modifier.isPrivate(mn.access)) {
|
||||||
|
mn.access = mn.access & (~ACC_PRIVATE);
|
||||||
|
}
|
||||||
|
if(Modifier.isProtected(mn.access)) {
|
||||||
|
mn.access = mn.access & (~ACC_PROTECTED);
|
||||||
|
}
|
||||||
|
mn.access = mn.access | ACC_PUBLIC;
|
||||||
|
}
|
||||||
|
|
||||||
if (!isStatic)
|
if (!isStatic)
|
||||||
m.visitVarInsn(ALOAD, 0);
|
m.visitVarInsn(ALOAD, 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user