]> Nishi Git Mirror - gwion.git/commitdiff
:art: Improve ANY >> Array:[T]
authorJérémie Astor <fennecdjay@gmail.com>
Sun, 5 Sep 2021 20:58:35 +0000 (22:58 +0200)
committerJérémie Astor <fennecdjay@gmail.com>
Sun, 5 Sep 2021 20:58:35 +0000 (22:58 +0200)
src/lib/array.c

index f785b3097f846d823730fac3c0be575576a95970..d628ae6a82f515e5ad0c4f976db178062899a11d 100644 (file)
@@ -209,7 +209,7 @@ static OP_EMIT(opem_array_sr) {
   const Instr pop = emit_add_instr(emit, RegMove);
   pop->m_val      = -SZ_INT;
   if (isa(bin->lhs->type, emit->gwion->type[et_compound]) > 0)
-    emit_compound_addref(emit, bin->lhs->type, -SZ_INT, false);
+    emit_compound_addref(emit, bin->lhs->type, -SZ_INT*2, false);
   (void)emit_add_instr(emit, ArrayAppendFront);
   return GW_OK;
 }