From 227b638fad5e434e7c8ee0e185cb768b4d8f4b96 Mon Sep 17 00:00:00 2001 From: william Date: Sun, 19 Mar 2017 00:16:10 +0100 Subject: [PATCH] rectif issue sur echo **** --- 42sh/src/glob/match_pattern.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/42sh/src/glob/match_pattern.c b/42sh/src/glob/match_pattern.c index cf9d95b0..04621b18 100644 --- a/42sh/src/glob/match_pattern.c +++ b/42sh/src/glob/match_pattern.c @@ -73,7 +73,11 @@ static int match_star(t_glob *gl, char *str, char *full_word) if (gl->pat[1] == '*' && !is_char_esc(gl->esc, ((char **)gl->m_pat->content)[0], gl->pat + 1)) - dir_research(gl, full_word, gl->pat + 1, (int[]){1, 0}); + { + while (gl->pat[1] == '*') + ++gl->pat; + dir_research(gl, full_word, gl->pat, (int[]){1, 0}); + } if (!*gl->pat || (*gl->pat == '*' && !*++gl->pat)) return (1); pat = gl->pat;