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 == '[') {