From: fennecdjay Date: Sat, 16 Jul 2022 11:55:16 +0000 (+0200) Subject: :bug: Fix clean_value in vm X-Git-Tag: nightly~264^2~96 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=817233c0644ef8231ad0e07f1c85adbaa9d62d0e;p=gwion.git :bug: Fix clean_value in vm --- 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);