From 86067747812a028a011c5b88fd9b8fb2f4f35bb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kha=C3=AFs=20COLIN?= Date: Mon, 24 Feb 2025 15:49:15 +0100 Subject: [PATCH] pipeline parse: note that | token at the end may lead to undefined behaviour --- src/parser/pipeline/pipeline_parse.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/parser/pipeline/pipeline_parse.c b/src/parser/pipeline/pipeline_parse.c index 404a41f..95470f1 100644 --- a/src/parser/pipeline/pipeline_parse.c +++ b/src/parser/pipeline/pipeline_parse.c @@ -6,7 +6,7 @@ /* By: khais +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/02/24 14:36:43 by khais #+# #+# */ -/* Updated: 2025/02/24 15:21:37 by khais ### ########.fr */ +/* Updated: 2025/02/24 15:53:04 by khais ### ########.fr */ /* */ /* ************************************************************************** */ @@ -92,6 +92,9 @@ static void pipeline_delimit(t_pipeline_builder *builder) ** additional memory freeing is required. ** in case of error in pipeline_delimit, it will call destroy, which will set ** builder->pipeline to NULL +** +** Note: if there is a | token at the end of the input stream, the results are +** undefined. */ t_pipeline *pipeline_parse_wordlist(t_pipeline_builder *builder) {