Skip to content

Commit

Permalink
Fix #672 - Invalid-inputs mishap from Thoth reads the stack backwards (
Browse files Browse the repository at this point in the history
  • Loading branch information
object-Object authored Aug 21, 2024
2 parents bfeb520 + e1b5771 commit 197d4c6
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ object OpForEach : Action {
if (stack.size < 2)
throw MishapNotEnoughArgs(2, stack.size)

val instrs = stack.getList(stack.lastIndex - 1)
val datums = stack.getList(stack.lastIndex)
val instrs = stack.getList(stack.lastIndex - 1, stack.size)
val datums = stack.getList(stack.lastIndex, stack.size)
stack.removeLastOrNull()
stack.removeLastOrNull()

Expand Down

0 comments on commit 197d4c6

Please sign in to comment.