fix: memory issues, parser errors and get_ast_if returning always NULL

This commit is contained in:
matteo 2026-01-30 16:51:10 +01:00 committed by Matteo Flebus
parent 5740195cb3
commit 52d35cf355
4 changed files with 5 additions and 2 deletions

View file

@ -19,7 +19,7 @@ struct ast *ast_create_if(struct ast *condition, struct ast *then_clause,
struct ast_if *ast_get_if(struct ast *node)
{
if (node == NULL || node->type == AST_IF)
if (node == NULL || node->type != AST_IF)
return NULL;
return node->data;
}