From 6d328a1b69e18e16b7768eccefb8c0b4fdb7b09b Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Tue, 20 Dec 2022 12:14:55 +0100 Subject: [PATCH] :bug: fix release_maybe_stack --- src/emit/emit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/emit/emit.c b/src/emit/emit.c index 4b9ac0e0..03239079 100644 --- a/src/emit/emit.c +++ b/src/emit/emit.c @@ -72,7 +72,7 @@ ANEW static Frame *new_frame(MemPool p) { ANN static void release_maybe_stack(const MemPool mp, MP_Vector * ms) { for (vtype i = ms->len + 1; --i;) { - const MaybeVal *mv = mp_vector_at(ms, MaybeVal, i); + const MaybeVal *mv = mp_vector_at(ms, MaybeVal, i - 1); struct M_Vector_ v = { .ptr = mv->ptr }; m_vector_release(&v); } -- 2.43.0