From e9439dd4e3f958d48f6965895a026aa7184f78db Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Tue, 26 May 2020 21:07:03 +0200 Subject: [PATCH] :bug: Fix soprk stack --- src/emit/emit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/emit/emit.c b/src/emit/emit.c index db22c519..c42789ef 100644 --- a/src/emit/emit.c +++ b/src/emit/emit.c @@ -1152,12 +1152,13 @@ ANN static m_bool spork_prepare_code(const Emitter emit, const struct Sporker *s } ANN static m_bool spork_prepare_func(const Emitter emit, const struct Sporker *sp) { - CHECK_BB(prepare_call(emit, &sp->exp->d.exp_call)) push_spork_code(emit, sp->is_spork ? SPORK_FUNC_PREFIX : FORK_CODE_PREFIX, sp->exp->pos); return call_spork_func(emit, &sp->exp->d.exp_call); } ANN static VM_Code spork_prepare(const Emitter emit, const struct Sporker *sp) { + if(!sp->code) + CHECK_BO(prepare_call(emit, &sp->exp->d.exp_call)) if((sp->code ? spork_prepare_code : spork_prepare_func)(emit, sp) > 0) return finalyze(emit, EOC); emit_pop_code(emit); -- 2.43.0