Commit 42abfbcf674b83a2f886bbf67ae41711fe45d726
1 parent
a6a6084a
fix typo in replaceConstructors
Showing
1 changed file
with
4 additions
and
4 deletions
java/common/com/mumfrey/liteloader/transformers/ByteCodeUtilities.java
| ... | ... | @@ -60,17 +60,17 @@ public abstract class ByteCodeUtilities |
| 60 | 60 | if (insn.getOpcode() == Opcodes.NEW) |
| 61 | 61 | { |
| 62 | 62 | TypeInsnNode typeInsn = (TypeInsnNode)insn; |
| 63 | - if (target.obf.equals(typeInsn.desc) || target.name.equals(typeInsn.desc)) | |
| 63 | + if (target.obf.equals(typeInsn.desc) || target.ref.equals(typeInsn.desc)) | |
| 64 | 64 | { |
| 65 | - typeInsn.desc = replacement.name; | |
| 65 | + typeInsn.desc = replacement.ref; | |
| 66 | 66 | } |
| 67 | 67 | } |
| 68 | 68 | else if (insn instanceof MethodInsnNode && insn.getOpcode() == Opcodes.INVOKESPECIAL) |
| 69 | 69 | { |
| 70 | 70 | MethodInsnNode methodInsn = (MethodInsnNode)insn; |
| 71 | - if ((target.obf.equals(methodInsn.owner) || target.name.equals(methodInsn.owner)) && "<init>".equals(methodInsn.name)) | |
| 71 | + if ((target.obf.equals(methodInsn.owner) || target.ref.equals(methodInsn.owner)) && "<init>".equals(methodInsn.name)) | |
| 72 | 72 | { |
| 73 | - methodInsn.owner = replacement.name; | |
| 73 | + methodInsn.owner = replacement.ref; | |
| 74 | 74 | } |
| 75 | 75 | } |
| 76 | 76 | } | ... | ... |