Fix InvalidKeyTransformer bug and comment

There were two problems:

- The current intention is for the uncompressed array to be 1 byte long,
  not 6 bytes - as map groups only have a single file, we don't need the
  group header.

- The comment was out of the sync with the intended code (replace
  uncompressed with a single element byte array containing zero).

Signed-off-by: Graham <gpe@openrs2.org>
bzip2
Graham 2 years ago
parent 7cde3a4552
commit cf983794fb
  1. 4
      patcher/src/main/kotlin/org/openrs2/patcher/transform/InvalidKeyTransformer.kt

@ -55,7 +55,7 @@ public class InvalidKeyTransformer : Transformer() {
*
* } catch (RuntimeException ex) {
* System.out.println("T3 - " + ...);
* uncompressed = new byte[] { 0, 0, 0, 0, 1, 1 };
* uncompressed = new byte[] { 0 };
* }
*/
val list = InsnList()
@ -64,7 +64,7 @@ public class InvalidKeyTransformer : Transformer() {
list.add(InsnNode(Opcodes.SWAP))
list.add(MethodInsnNode(Opcodes.INVOKEVIRTUAL, "java/io/PrintStream", "println", "(Ljava/lang/String;)V"))
list.add(IntInsnNode(Opcodes.BIPUSH, 6))
list.add(IntInsnNode(Opcodes.BIPUSH, 1))
list.add(IntInsnNode(Opcodes.NEWARRAY, Opcodes.T_BYTE))
list.add(InsnNode(Opcodes.DUP))

Loading…
Cancel
Save