From c93975e55f0b690c3c307b2894cf815a9625afd9 Mon Sep 17 00:00:00 2001 From: Oksana Hnatiuk Date: Sat, 19 Aug 2023 08:07:11 +0200 Subject: [PATCH] Fix cases: echo "", echo ''. Output should be an empty line in terminal. Not sure, if this change doesn't destroy smth in pipes. --- src/parser/parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parser/parse.c b/src/parser/parse.c index 9af5a6a..37addb4 100644 --- a/src/parser/parse.c +++ b/src/parser/parse.c @@ -94,7 +94,7 @@ int count_pipes(t_data *data) npipes = 0; while (this->str != NULL) { - if (ft_strncmp(this->str, "|", ft_strlen(this->str)) == 0) + if (ft_strncmp(this->str, "|", 2) == 0) npipes++; this = this->next; }