Improved ASMReader parsing. Can now handle method/field instructions with spaces in the description

Added equals method to colour
This commit is contained in:
Chicken-Bomes committed 2014-01-09 02:55:11 +10:00
1 parent eb6f5e5e7b
commit 5401f3afb0
2 files changed
+9 -1

No files matched your search

+4 -1
View File
@@ -305,7 +305,10 @@ public class ASMReader
break;
case FIELD_INSN:
case METHOD_INSN:
insn = ObfMapping.fromDesc(split[1]).toInsn(opcode);
StringBuilder sb = new StringBuilder();
for(int i = 1; i < split.length; i++)
sb.append(split[i]);
insn = ObfMapping.fromDesc(sb.toString()).toInsn(opcode);
break;
case INVOKE_DYNAMIC_INSN:
throw new Exception("Found INVOKEDYNAMIC while reading");
+5
View File
@@ -138,4 +138,9 @@ public abstract class Colour
a = colour.a;
return this;
}
public boolean equals(Colour colour)
{
return colour != null && rgba() == colour.rgba();
}
}