From d41ade3355d03280c9aac7f4438c0077140daba2 Mon Sep 17 00:00:00 2001 From: litlep-nibbyt <9344275+litlep-nibbyt@users.noreply.github.com> Date: Fri, 20 Sep 2024 11:07:31 -0400 Subject: [PATCH] limited fix --- rust/sword/src/interpreter.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rust/sword/src/interpreter.rs b/rust/sword/src/interpreter.rs index f2b22e9..186cb1e 100644 --- a/rust/sword/src/interpreter.rs +++ b/rust/sword/src/interpreter.rs @@ -1229,7 +1229,11 @@ fn exit( let h = *(stack.local_noun_pointer(0)); // XX: Small chance of clobbering something important after OOM? // XX: what if we OOM while making a stack trace - T(stack, &[h, t]) + if t.raw_equals(D(0)) { + h + } else { + T(stack, &[t, h, D(0)]) + } } };