Merge pull request #340 from Cypher121/patch-1

Fix Hermes reading from bottom of the stack
This commit is contained in:
petrak@ 2022-12-03 11:16:39 -05:00 committed by GitHub
commit 4a3ffd924f
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 {