fix: memory issues, parser errors and get_ast_if returning always NULL
This commit is contained in:
parent
5740195cb3
commit
52d35cf355
4 changed files with 5 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue