From: Jérémie Astor Date: Wed, 24 Feb 2021 17:26:59 +0000 (+0100) Subject: :bug: Fix foreach and scoped_stmt (vm) X-Git-Tag: nightly~926 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=e7851f52ea7c152f7bbce40128e4310b8ec48544;p=gwion.git :bug: Fix foreach and scoped_stmt (vm) --- 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))