Fix Hermes reading from bottom of the stack

Closes #339
This commit is contained in:
June 2022-12-01 18:37:09 +01:00 committed by GitHub
parent 7da34e9174
commit 68db125848
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -19,7 +19,7 @@ object OpEval : Action {
ravenmind: Iota?,
ctx: CastingContext
): OperationResult {
val datum = stack.getOrElse(0) { throw MishapNotEnoughArgs(1, 0) }
val datum = stack.removeLastOrNull() ?: throw MishapNotEnoughArgs(1, 0)
val instrs = evaluatable(datum, 0)
instrs.ifRight {