summaryrefslogtreecommitdiffstats
path: root/src/p_lblock.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-10-21 21:11:51 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-10-21 21:11:51 +0200
commit754cc63f327eb7fa40bf1b780d75da0a1482d3be (patch)
tree53a540a7b1ba88b5af435c5a27afd7df4349d43b /src/p_lblock.c
parentAdd new file (diff)
download42-minishell-754cc63f327eb7fa40bf1b780d75da0a1482d3be.tar.gz
42-minishell-754cc63f327eb7fa40bf1b780d75da0a1482d3be.tar.bz2
42-minishell-754cc63f327eb7fa40bf1b780d75da0a1482d3be.tar.xz
42-minishell-754cc63f327eb7fa40bf1b780d75da0a1482d3be.tar.zst
42-minishell-754cc63f327eb7fa40bf1b780d75da0a1482d3be.zip
Mostly works, || issues
Diffstat (limited to 'src/p_lblock.c')
-rw-r--r--src/p_lblock.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/p_lblock.c b/src/p_lblock.c
index 369eb5a..b8341cd 100644
--- a/src/p_lblock.c
+++ b/src/p_lblock.c
@@ -23,8 +23,8 @@
#include "p_split.h"
#include "s_line.h"
#include "s_lpipes.h"
-#include "u_parse.h"
#include "s_struct.h"
+#include "u_parse.h"
#include "u_utils.h"
static uint8_t p_get_nextif(char *words[], size_t i)
@@ -54,7 +54,7 @@ static t_bool p_find_good_pipe(const char word[])
if (*ptr == C_PIPE)
{
if (mode == Q_NONE && u_is_not_escaped(word, ptr) == TRUE
- && *(ptr + 1) != C_PIPE)
+ && *(ptr + 1) != C_PIPE && *(ptr - 1) != C_PIPE)
return (TRUE);
}
if (*ptr == C_DQUOTE)