From: Jérémie Astor Date: Tue, 26 May 2020 16:57:36 +0000 (+0200) Subject: :bug: Fix emit->code stack, class_def must return error on failure X-Git-Tag: nightly~1509 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=27343af9a72db08d500b119d9411d57d9541d30a;p=gwion.git :bug: Fix emit->code stack, class_def must return error on failure --- diff --git a/src/emit/emit.c b/src/emit/emit.c index 25eb7002..2c6a0e84 100644 --- a/src/emit/emit.c +++ b/src/emit/emit.c @@ -2033,8 +2033,10 @@ ANN static m_bool emit_class_def(const Emitter emit, const Class_Def cdef) { emit_class_code(emit, t->name); if(scanx_body(emit->env, cdef, (_exp_func)emit_section, emit) > 0) emit_class_finish(emit, t->nspc); - else + else { emit_pop_code(emit); + return GW_ERROR; + } } return GW_OK; }