From 7cfbad35828e4d499174258e7b6b558ea33ac19f Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Fri, 4 Dec 2020 12:36:13 +0100 Subject: [PATCH] :bug: Fix match --- src/emit/emit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 }; -- 2.43.0