From 065494cc16118f8ee49003a834accbb237929528 Mon Sep 17 00:00:00 2001 From: adjoly Date: Sun, 4 Aug 2024 13:45:57 +0200 Subject: [PATCH] =?UTF-8?q?=E3=80=8C=F0=9F=94=A8=E3=80=8D=20fix:=20when=20?= =?UTF-8?q?pipe=20last=20char?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/parsing/check_error/check_pipe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/parsing/check_error/check_pipe.c b/src/parsing/check_error/check_pipe.c index 901188a..93c65a3 100644 --- a/src/parsing/check_error/check_pipe.c +++ b/src/parsing/check_error/check_pipe.c @@ -6,7 +6,7 @@ /* By: adjoly +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/06/30 12:52:22 by adjoly #+# #+# */ -/* Updated: 2024/07/31 14:46:19 by adjoly ### ########.fr */ +/* Updated: 2024/08/04 13:45:18 by adjoly ### ########.fr */ /* */ /* ************************************************************************** */ @@ -35,7 +35,7 @@ bool check_pipe(char *readline) { if (*tmp == '|' && is_inquote(readline, tmp - readline) == FALSE) { - if (*(tmp + 1) == '|') + if (!*(tmp + 1) || *(tmp + 1) == '|') return (send_error_parsing("No command after pipe")); tmp++; while (*tmp && ft_isspace(*tmp))