Skip to content

Commit

Permalink
Merge pull request #1 from catsalty/catsalty-patch-1
Browse files Browse the repository at this point in the history
[bugfix]fix TransformCallToStatic with invokeinterface or invokedynamic
  • Loading branch information
catsalty authored Jul 25, 2024
2 parents 4c998e0 + 6722b96 commit 1594125
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/javassist/convert/TransformCallToStatic.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ protected int match(int c, int pos, CodeIterator iterator, int typedesc, ConstPo
}
iterator.writeByte(Opcode.INVOKESTATIC, pos);
iterator.write16bit(newIndex, pos + 1);
if (c == Opcode.INVOKEINTERFACE || c == Opcode.INVOKEDYNAMIC) {
iterator.writeByte(0, pos + 3);
}
return pos;
}
}

0 comments on commit 1594125

Please sign in to comment.