Skip to content

Commit

Permalink
Merge pull request #2 from EvilCodeZ/master
Browse files Browse the repository at this point in the history
Fixed POP2 instruction in StackBasedCalculator.
  • Loading branch information
SuspiciousActivity authored Sep 5, 2021
2 parents cfa278c + 4beaab1 commit ad975e6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/me/ByteEdit/edit/StackBasedCalculator.java
Original file line number Diff line number Diff line change
Expand Up @@ -580,8 +580,10 @@ private boolean handle(AbstractInsnNode node) {
change(node);
return false;
case POP2:
stack.pop();
stack.pop();
Number val = stack.pop();
if(!(val instanceof Long) && !(val instanceof Double)) {
stack.pop();
}
change(node);
return false;
case SWAP: {
Expand Down

0 comments on commit ad975e6

Please sign in to comment.