From: Jérémie Astor Date: Wed, 11 May 2022 18:33:53 +0000 (+0200) Subject: :bug: Abort compilation on locale error X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=79d2c30999068ebe50aa322bbb6a5eaca5c4e3cd;p=gwion.git :bug: Abort compilation on locale error --- diff --git a/src/emit/emit.c b/src/emit/emit.c index fcf0a2ad..ce61d198 100644 --- a/src/emit/emit.c +++ b/src/emit/emit.c @@ -931,8 +931,10 @@ ANN static m_bool emit_prim_locale(const Emitter emit, const Symbol *id) { shred->info->me->ref++; vm_run(emit->gwion->vm); emit->gwion->vm->bbq->is_running = true; + const m_float ret = *(m_float*)shred->reg; + if(ret == -1.0) return GW_ERROR; const Instr instr = emit_add_instr(emit, RegPushImm2); - instr->f = *(m_float*)shred->reg; + instr->f = ret; return GW_OK; }