[FIX] Забытый POP...

This commit is contained in:
zaxar163 2019-10-19 21:08:18 +03:00
parent f5fe5afe81
commit 5ed233613f

View file

@ -54,13 +54,14 @@ public void setByteArrayListField(String name, List<byte[]> b) {
constructor.instructions.add(new InsnNode(Opcodes.DUP));
constructor.instructions.add(new MethodInsnNode(Opcodes.INVOKESPECIAL, "java/util/ArrayList", "<init>", "()V"));
for (byte[] value : b) {
constructor.instructions.add(new InsnNode(Opcodes.DUP));
constructor.instructions.add(new InsnNode(Opcodes.DUP)); // +1-1
constructor.instructions.add(new MethodInsnNode(Opcodes.INVOKESTATIC, "java/util/Base64", "getDecoder", "()Ljava/util/Base64$Decoder;", false));
constructor.instructions.add(NodeUtils.getSafeStringInsnList(Base64.getEncoder().encodeToString(value)));
constructor.instructions.add(new MethodInsnNode(Opcodes.INVOKEVIRTUAL, "java/util/Base64$Decoder", "decode", base64DecDesc, false));
constructor.instructions.add(new MethodInsnNode(Opcodes.INVOKEINTERFACE, "java/util/List", "add", "(Ljava/lang/Object;)Z", false));
constructor.instructions.add(new MethodInsnNode(Opcodes.INVOKEINTERFACE, "java/util/List", "add", "(Ljava/lang/Object;)Z", true));
constructor.instructions.add(new InsnNode(Opcodes.POP));
}
constructor.instructions.add(new InsnNode(Opcodes.POP)); // needs -1
constructor.instructions.add(new FieldInsnNode(Opcodes.PUTFIELD, configclass.name, name, "Ljava/util/List;"));
}