From 9943b99915735587f94ad574ba968fda57a2b9d3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Sun, 17 May 2020 16:09:22 +0200 Subject: [PATCH] :bug: Fix decl instr --- src/emit/emit.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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); -- 2.43.0