Skip to content

Commit

Permalink
Fix insnToString not accepting AbstractInsnNode (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathing authored Oct 15, 2024
1 parent c3dac8c commit 0a44e31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/net/minecraftforge/coremod/api/ASMAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -556,15 +556,15 @@ public static String methodNodeToString(MethodNode node) {
* @param insn The instruction to convert.
* @return The string representation of the instruction.
*/
public static String insnToString(InsnNode insn) {
public static String insnToString(AbstractInsnNode insn) {
Textifier text = new Textifier();
insn.accept(new TraceMethodVisitor(text));
return toString(text);
}

/**
* Converts a {@link InsnList} to a string representation, displaying each instruction in the list similar to
* {@link #insnToString(InsnNode)}.
* {@link #insnToString(AbstractInsnNode)}.
*
* @param list The list to convert.
* @return The string
Expand Down

0 comments on commit 0a44e31

Please sign in to comment.