From bf15a86c2e79c2489b8b475bf7a81d68ba04e384 Mon Sep 17 00:00:00 2001 From: Camille Chauvet Date: Mon, 13 Mar 2023 15:12:50 +0100 Subject: [PATCH] clean: remove trash file --- parse/parse.c | 1 + redirection/redirection.c | 2 ++ t | 1 - 3 files changed, 3 insertions(+), 1 deletion(-) delete mode 100755 t diff --git a/parse/parse.c b/parse/parse.c index cb324e6..b8d18e7 100644 --- a/parse/parse.c +++ b/parse/parse.c @@ -100,6 +100,7 @@ int ft_cmds_parser(t_data *data, const char *line) tab = ft_split_quoted(line, '|'); if (tab == NULL) { + ft_freer_tab_ultimate(1, tab); ft_eprintf("minishell: malloc failed\n"); return (1); } diff --git a/redirection/redirection.c b/redirection/redirection.c index c9fa7d1..93855c2 100644 --- a/redirection/redirection.c +++ b/redirection/redirection.c @@ -38,6 +38,8 @@ void ft_remove_redirection(char *cmd_str) i++; if (ft_is_in("<>", cmd_str[i])) start = i; + if (start == -1) + continue ; while (cmd_str[i] == cmd_str[start]) i++; i++; diff --git a/t b/t deleted file mode 100755 index 9b47f86..0000000 --- a/t +++ /dev/null @@ -1 +0,0 @@ -bozo