]> Nishi Git Mirror - gwion.git/commitdiff
:art: Vararg coverage
authorfennecdjay <astor.jeremie@wanadoo.fr>
Fri, 11 Oct 2019 14:27:34 +0000 (16:27 +0200)
committerfennecdjay <astor.jeremie@wanadoo.fr>
Fri, 11 Oct 2019 14:27:34 +0000 (16:27 +0200)
src/lib/vararg.c

index 250823ce515a13d49316f74992bbe98aa6208802..e6996c21b217600528ae9bebdf725a71846a80ea 100644 (file)
@@ -29,12 +29,8 @@ void free_vararg(MemPool p, struct Vararg_* arg) {
 INSTR(VarargTop) {
   struct Vararg_* arg = *(struct Vararg_**)MEM(instr->m_val);
   if(arg) {
-    if(arg->d)
-      PUSH_REG(shred, SZ_INT)
-    else {
-      shred->pc = instr->m_val2 + 1;
-      mp_free(shred->info->mp, Vararg, arg);
-    }
+    assert(arg->d);
+    PUSH_REG(shred, SZ_INT)
   } else
     shred->pc = instr->m_val2 + 1;
 }