From: Jérémie Astor Date: Wed, 18 Nov 2020 19:04:31 +0000 (+0100) Subject: :art: Clean ArrayInfo X-Git-Tag: nightly~1147 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=5d7bd36d9e277fc1e783700992edb0792cb10887;p=gwion.git :art: Clean ArrayInfo --- diff --git a/src/lib/array.c b/src/lib/array.c index dd72ed81..d413f071 100644 --- a/src/lib/array.c +++ b/src/lib/array.c @@ -503,7 +503,7 @@ ANN static M_Object do_alloc_array_loop(const VM_Shred shred, ArrayInfo* info, const m_uint cap, const M_Object base) { for(m_uint i = 0; i < cap; ++i) { struct ArrayInfo_ aai = { info->depth + 1, info->type, - info->base, info->data, { info->d.idx } , 0, info->is_obj }; + info->base, info->data, { info->d.idx } , info->is_obj }; const M_Object next = do_alloc_array(shred, &aai); if(!next) { _release(base, shred); @@ -538,8 +538,8 @@ INSTR(ArrayAlloc) { const ArrayInfo* info = (ArrayInfo*)instr->m_val; m_uint num_obj = 1; m_int idx = 0; - struct ArrayInfo_ aai = { -info->depth, info->type, info->base, - NULL, { &idx }, 0, info->is_obj}; + struct ArrayInfo_ aai = { -info->depth, info->type, .base=info->base, + NULL, { &idx }, info->is_obj}; if(info->is_obj) aai.data = init_array(shred, info, &num_obj); const M_Object ref = do_alloc_array(shred, &aai);