From 0e03cfd7776238b9393ff1828a255af499e8b868 Mon Sep 17 00:00:00 2001 From: adjoly Date: Mon, 29 Jul 2024 21:16:07 +0200 Subject: [PATCH] =?UTF-8?q?=E3=80=8C=F0=9F=8F=97=EF=B8=8F=E3=80=8D=20wip:?= =?UTF-8?q?=20les=20pipe=20marche=20po?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/parsing/check_error/check_pipe.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/parsing/check_error/check_pipe.c b/src/parsing/check_error/check_pipe.c index cf7e0ec..bad3e59 100644 --- a/src/parsing/check_error/check_pipe.c +++ b/src/parsing/check_error/check_pipe.c @@ -6,10 +6,10 @@ /* By: adjoly +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/06/30 12:52:22 by adjoly #+# #+# */ -/* Updated: 2024/07/29 20:41:05 by adjoly ### ########.fr */ +/* Updated: 2024/07/29 21:15:29 by adjoly ### ########.fr */ /* */ /* ************************************************************************** */ - +\ #include "libft.h" #include "parsing.h" #include @@ -35,11 +35,9 @@ bool check_pipe(char *readline) { if (*tmp == '|' && is_inquote(readline, tmp - readline) == FALSE) { - if (!*tmp) - return (send_error_parsing("No command after pipe")); - while (*tmp && !ft_isspace(*tmp)) + while (tmp && *tmp && ft_isspace(*tmp)) tmp++; - if (!*tmp) + if (!tmp && !*tmp) return (send_error_parsing("No command after pipe")); } tmp++;