Skip to content

Commit 60e0884

Browse files
Fix incrementing PC after GOTO insertion
Co-authored-by: Wölfchen <115360611+W-lfchen@users.noreply.github.com>
1 parent c11561f commit 60e0884

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

OPAL/br/src/main/scala/org/opalj/br/reader/BytecodeOptimizer.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,8 @@ trait BytecodeOptimizer extends MethodsBinding {
294294
) {
295295
// Replace it by a short goto, which has length 3 instead of length 5
296296
instructions(pc + 0) = GOTO(newBranchoffset)
297-
instructions(pc + 1) = NOP
298-
instructions(pc + 2) = NOP
297+
instructions(pc + 3) = NOP
298+
instructions(pc + 4) = NOP
299299
simplified = true
300300
} else {
301301
// let's replace the original jump

0 commit comments

Comments
 (0)