From eb9762ce5bfb14f7f4777f712c38bdd4b117da0a Mon Sep 17 00:00:00 2001 From: Egor Koleda Date: Thu, 22 Aug 2019 19:10:28 +0300 Subject: [PATCH] [FIX] AutogenConfig VerifyError(#326) --- .../java/pro/gravit/launchserver/binary/JAConfigurator.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/binary/JAConfigurator.java b/LaunchServer/src/main/java/pro/gravit/launchserver/binary/JAConfigurator.java index 57d16493..056f457a 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/binary/JAConfigurator.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/binary/JAConfigurator.java @@ -37,6 +37,8 @@ public JAConfigurator(ClassNode configclass) { this.configclass = configclass; constructor = configclass.methods.stream().filter(e -> "".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), "", "()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));