fix: Fixed ALL the code

This commit is contained in:
Gu://em_ 2026-01-10 19:57:36 +01:00
parent 03c35d5366
commit 97b7240286
10 changed files with 68 additions and 11 deletions

View file

@ -112,12 +112,11 @@ int execution(struct ast *ast)
return 0;
}
case AST_CMD: {
struct ast_cmd *cmd = ast->data->ast_cmd; // Cast implicit
struct ast_cmd *cmd = ast_get_cmd(ast);
return exec_command(cmd); // It's recursive
}
case AST_IF: {
struct ast_if *if_node =
ast->data->ast_if; // We cast the union to ast_if
struct ast_if *if_node = ast_get_if(ast);
int cond = execution(if_node->condition);
if (cond == 0) // True
{