mirror of
https://github.com/GravitLauncher/Launcher
synced 2025-01-09 00:59:44 +03:00
[FIX] AutogenConfig VerifyError(#326)
This commit is contained in:
parent
50433d0b9d
commit
eb9762ce5b
1 changed files with 3 additions and 1 deletions
|
@ -37,6 +37,8 @@ public JAConfigurator(ClassNode configclass) {
|
|||
this.configclass = configclass;
|
||||
constructor = configclass.methods.stream().filter(e -> "<init>".equals(e.name)).findFirst().get();
|
||||
constructor.instructions = new InsnList();
|
||||
constructor.instructions.add(new VarInsnNode(Opcodes.ALOAD, 0));
|
||||
constructor.instructions.add(new MethodInsnNode(Opcodes.INVOKESPECIAL, Type.getInternalName(Object.class), "<init>", "()V"));
|
||||
initModuleMethod = configclass.methods.stream().filter(e -> "initModules".equals(e.name)).findFirst().get();
|
||||
initModuleMethod.instructions = new InsnList();
|
||||
}
|
||||
|
@ -91,7 +93,7 @@ public void setGuardType(String key) {
|
|||
}
|
||||
|
||||
public void push(final int value) {
|
||||
if (value >= -1 && value <= 5)
|
||||
if (value >= -1 && value <= 5)
|
||||
constructor.instructions.add(new InsnNode(Opcodes.ICONST_0 + value));
|
||||
else if (value >= Byte.MIN_VALUE && value <= Byte.MAX_VALUE)
|
||||
constructor.instructions.add(new IntInsnNode(Opcodes.BIPUSH, value));
|
||||
|
|
Loading…
Reference in a new issue