]> Nishi Git Mirror - gwion.git/commitdiff
:bug: Fix (breaked) repeat stack
authorfennecdjay <astor.jeremie@wanadoo.fr>
Wed, 22 May 2019 21:26:40 +0000 (23:26 +0200)
committerfennecdjay <astor.jeremie@wanadoo.fr>
Wed, 22 May 2019 21:26:40 +0000 (23:26 +0200)
src/emit/emit.c

index 5bb689f28bf9afab13447f575bcf533343d0915c..c2dcb514781d75ef035de2655a2682989a380295 100644 (file)
@@ -1242,8 +1242,8 @@ ANN static m_bool emit_stmt_loop(const Emitter emit, const Stmt_Loop stmt) {
   const Instr _goto = emit_add_instr(emit, Goto);
   _goto->m_val = index;
   op->m_val = emit_code_size(emit);
-  regpop(emit, SZ_INT);
   emit_pop_stack(emit, index);
+  regpop(emit, SZ_INT);
   return GW_OK;
 }