From 8f34c0f318bdff302adf96e6427aed09443119e1 Mon Sep 17 00:00:00 2001 From: william Date: Mon, 27 Mar 2017 01:07:32 +0200 Subject: [PATCH] rectif match with ? --- 42sh/src/glob/match_pattern.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/42sh/src/glob/match_pattern.c b/42sh/src/glob/match_pattern.c index 94cbed7d..7ac647e6 100644 --- a/42sh/src/glob/match_pattern.c +++ b/42sh/src/glob/match_pattern.c @@ -113,7 +113,7 @@ int match_pattern(t_glob *gl, char *str, char *full_word) if (*str != *gl->pat) return (0); } - else if (*gl->pat == '?') + else if (*gl->pat == '?' && *str) ; else if (*gl->pat == '[') {