From: Jérémie Astor Date: Fri, 4 Dec 2020 11:36:13 +0000 (+0100) Subject: :bug: Fix match X-Git-Tag: nightly~1131 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=7cfbad35828e4d499174258e7b6b558ea33ac19f;p=gwion.git :bug: Fix match --- diff --git a/src/emit/emit.c b/src/emit/emit.c index 84925707..b5cd7f29 100644 --- a/src/emit/emit.c +++ b/src/emit/emit.c @@ -1771,8 +1771,8 @@ ANN static m_bool emit_case_head(const Emitter emit, const Exp base, CHECK_BB(emit_exp(emit, base)) CHECK_BB(emit_exp_pop_next(emit, e)) const m_int size = -exp_size(e); - emit_exp_addref(emit, base, -exp_totalsize(base) - size); - emit_exp_addref1(emit, e, -size); + emit_exp_addref(emit, base, -exp_totalsize(base) + size); + emit_exp_addref1(emit, e, size); const Exp_Binary bin = { .lhs=base, .rhs=e, .op=op }; struct ExpInfo_ info = { .nspc=e->info->nspc }; struct Exp_ ebin = { .d={.exp_binary=bin}, .info=&info };