From da948f58fe7c382bef7d17010517002a31eb31ab Mon Sep 17 00:00:00 2001 From: matteo Date: Sat, 24 Jan 2026 14:52:37 +0100 Subject: [PATCH] fix(execution): ast_void does not affect return value => if statements now work --- src/execution/execution.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/execution/execution.c b/src/execution/execution.c index d1d0e97..4522bcc 100644 --- a/src/execution/execution.c +++ b/src/execution/execution.c @@ -245,7 +245,8 @@ int execution(struct ast *ast, struct hash_map *vars) while (cur) { struct ast *child = (struct ast *)cur->data; - ret = execution(child, vars); + if (!ast_is_void(child)) + ret = execution(child, vars); cur = cur->next; } return ret; @@ -358,4 +359,4 @@ int execution(struct ast *ast, struct hash_map *vars) return 127; } } -} \ No newline at end of file +}