From e7851f52ea7c152f7bbce40128e4310b8ec48544 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Wed, 24 Feb 2021 18:26:59 +0100 Subject: [PATCH] :bug: Fix foreach and scoped_stmt (vm) --- src/vm/vm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vm/vm.c b/src/vm/vm.c index 1789a880..ee12c068 100644 --- a/src/vm/vm.c +++ b/src/vm/vm.c @@ -732,8 +732,8 @@ autounrollinit: *(m_uint*)(mem + VAL) = m_vector_size(ARRAY(*(M_Object*)(mem+VAL+SZ_INT))); DISPATCH() autoloop: - *(m_bit**)(mem + VAL + SZ_INT) = m_vector_addr(ARRAY(*(M_Object*)(mem+VAL-SZ_INT)), *(m_uint*)(mem + VAL)); - *(m_uint*)reg = m_vector_size(ARRAY(*(M_Object*)(mem+VAL-SZ_INT))) - (*(m_uint*)(mem + VAL))++; + *(m_bit**)(mem + VAL + SZ_INT) = m_vector_addr(ARRAY(*(M_Object*)(mem+VAL-SZ_INT)), *(m_uint*)(mem + VAL) + 1); + *(m_uint*)reg = m_vector_size(ARRAY(*(M_Object*)(mem+VAL-SZ_INT))) - (*(m_uint*)(mem + VAL))++ -1; DISPATCH() arraytop: if(*(m_uint*)(reg - SZ_INT * 2) < *(m_uint*)(reg-SZ_INT)) -- 2.43.0