From: Jérémie Astor Date: Sun, 17 May 2020 14:09:22 +0000 (+0200) Subject: :bug: Fix decl instr X-Git-Tag: nightly~1542 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=9943b99915735587f94ad574ba968fda57a2b9d3;p=gwion.git :bug: Fix decl instr --- diff --git a/src/emit/emit.c b/src/emit/emit.c index ced890f5..01e6e9d5 100644 --- a/src/emit/emit.c +++ b/src/emit/emit.c @@ -636,8 +636,7 @@ ANN static m_bool emit_exp_decl_non_static(const Emitter emit, const Exp_Decl *d } const Instr instr = !(SAFE_FLAG(emit->env->class_def, struct) && !emit->env->scope->depth) ? emit_kind(emit, v->type->size, !struct_ctor(v) ? emit_addr : 1, exec) : emit_struct_decl(emit, v, emit_addr); - if(!GET_FLAG(v, member)) - instr->m_val = v->from->offset; + instr->m_val = v->from->offset; if(is_obj && (is_array || !is_ref)) { emit_add_instr(emit, Assign); const size_t missing_depth = type->array_depth - (array ? array->depth : 0);