From: Jérémie Astor Date: Sun, 5 Sep 2021 20:51:11 +0000 (+0200) Subject: :art: Improve Array:[T].map X-Git-Tag: nightly~470^2~11 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=0f54f0cb88ca004351f65fd6cd8711c90250480a;p=gwion.git :art: Improve Array:[T].map --- diff --git a/src/lib/array.c b/src/lib/array.c index f1cd6fe4..f785b309 100644 --- a/src/lib/array.c +++ b/src/lib/array.c @@ -446,7 +446,7 @@ static INSTR(map_run_ini) { FunctionalFrame *frame = &*(FunctionalFrame *)MEM(SZ_INT * 3); shred->pc++; shred->mem += MAP_CODE_OFFSET + SZ_INT; // work in a safe memory space - m_vector_get(array, frame->index, &*(m_bit **)(shred->mem + SZ_INT * 3 + frame->code->stack_depth)); + m_vector_get(array, frame->index, &*(m_bit **)(shred->mem + SZ_INT * 2 + frame->offset + frame->code->stack_depth)); } static INSTR(map_run_end) {