From 817233c0644ef8231ad0e07f1c85adbaa9d62d0e Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Sat, 16 Jul 2022 13:55:16 +0200 Subject: [PATCH] :bug: Fix clean_value in vm --- src/vm/vm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vm/vm.c b/src/vm/vm.c index 909f2dae..a787db6a 100644 --- a/src/vm/vm.c +++ b/src/vm/vm.c @@ -51,7 +51,7 @@ ANN static void clean_values(const VM_Shred shred) { const VM_Code code = shred->code; const uint16_t pc = shred->pc; for (m_uint i = m_vector_size(&code->live_values) + 1; --i;) { - VMValue *vmval = (VMValue *)m_vector_addr(&code->live_values, i); + VMValue *vmval = (VMValue *)m_vector_addr(&code->live_values, i - 1); if (pc <= vmval->start) break; if (pc >= vmval->end) continue; m_bit *const data = &*(m_bit *)(shred->mem + vmval->offset); -- 2.43.0