From 98bfec2266ee751011cb3cd475f462393e976724 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Thu, 26 Feb 2026 00:02:04 +0200 Subject: add fallback return path --- src/lower.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lower.c b/src/lower.c index ee8253a..880fa0b 100644 --- a/src/lower.c +++ b/src/lower.c @@ -1135,6 +1135,10 @@ static int lower_proc(struct state *state, struct ast *proc) struct ast *block = proc_body(proc); ret = lower_stmt_list(&new_state, block_body(block), true); + /* in case nothing else has returned */ + indent(&new_state); + fprintf(new_state.code, "return stack;\n"); + fprintf(new_state.code, "}\n\n"); fprintf(new_state.ctx, "};\n\n"); -- cgit v1.2.3