Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (AbstractInsnNode node : mn.instructions.toArray()) {
- if (node.getOpcode() == Opcodes.IXOR) {
- if (node.getPrevious().getOpcode() == Opcodes.ICONST_M1) {
- mn.instructions.remove(node.getPrevious());
- }
- if (node.getPrevious().getOpcode() == Opcodes.ICONST_M1) {
- mn.instructions.set(node.getNext(), new InsnNode(Opcodes.ICONST_0));
- }
- mn.instructions.remove(node);
- modifications++;
- }
- }
Add Comment
Please, Sign In to add comment