From: Lukas Jiriste Date: Fri, 2 Aug 2024 15:03:49 +0000 (+0200) Subject: Fix crashes on empty input X-Git-Url: https://git.ljiriste.work/?a=commitdiff_plain;h=1b768732c54cfcae42d851009870362d322bcfef;p=42%2Fminishell.git Fix crashes on empty input --- diff --git a/src/parsing.c b/src/parsing.c index c228d53..06f93f3 100644 --- a/src/parsing.c +++ b/src/parsing.c @@ -6,7 +6,7 @@ /* By: ljiriste +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/05/03 15:58:55 by ljiriste #+# #+# */ -/* Updated: 2024/08/02 14:16:59 by ljiriste ### ########.fr */ +/* Updated: 2024/08/02 17:03:23 by ljiriste ### ########.fr */ /* */ /* ************************************************************************** */ @@ -23,5 +23,5 @@ int parse(t_vec *tokens, t_tree **parse_tree) ft_parsing_table_load_str(&table, g_str_table, g_str_rules); *parse_tree = ft_parse(tokens, &table); ft_parsing_table_free(&table); - return (parse_tree == NULL); + return (*parse_tree == NULL); }