Skip to content
This repository was archived by the owner on Sep 1, 2020. It is now read-only.

Commit 6372c71

Browse files
committed
Fix wrong indexing in FrameExtensions.peekStack
1 parent f438186 commit 6372c71

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/scala/tools/nsc/backend/jvm/opt/BytecodeUtils.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ object BytecodeUtils {
341341
/**
342342
* The value `n` positions down the stack.
343343
*/
344-
def peekStack(n: Int): V = frame.getStack(frame.getMaxStackSize - 1 - n)
344+
def peekStack(n: Int): V = frame.getStack(frame.getStackSize - 1 - n)
345345

346346
/**
347347
* The index of the current stack top.

0 commit comments

Comments
 (0)