]> Nishi Git Mirror - gwion.git/commitdiff
:art: Fix static decl leak
authorJérémie Astor <fennecdjay@gmail.com>
Sat, 4 Sep 2021 16:11:01 +0000 (18:11 +0200)
committerJérémie Astor <fennecdjay@gmail.com>
Sat, 4 Sep 2021 16:11:01 +0000 (18:11 +0200)
src/emit/emit.c

index b02a6b01ee4ec403d29e0886adeda338122980b8..c8c80fee511daf290a5d69b832f87102b848c6f7 100644 (file)
@@ -812,8 +812,8 @@ ANN static m_bool decl_static(const Emitter emit, const Exp_Decl *decl,
       emit_instantiate_decl(emit, v->type, decl->td, var_decl->array, is_ref));
   CHECK_BB(emit_dot_static_data(emit, v, 1));
   emit_add_instr(emit, Assign);
-  if(get_depth(var_decl->value->type) && !is_ref)
-    (void)emit_object_addref(emit, -SZ_INT, 0);
+//  if(get_depth(var_decl->value->type) && !is_ref)
+//    (void)emit_object_addref(emit, -SZ_INT, 0);
   regpop(emit, SZ_INT);
   emit->code = code;
   return GW_OK;