aboutsummaryrefslogtreecommitdiff
path: root/posix/fnmatch_loop.c
diff options
context:
space:
mode:
Diffstat (limited to 'posix/fnmatch_loop.c')
-rw-r--r--posix/fnmatch_loop.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/posix/fnmatch_loop.c b/posix/fnmatch_loop.c
index 4c6168a..8bdd9a6 100644
--- a/posix/fnmatch_loop.c
+++ b/posix/fnmatch_loop.c
@@ -592,7 +592,8 @@ FCT (pattern, string, string_end, no_leading_period, flags)
/* We have to handling the symbols differently in
ranges since then the collation sequence is
important. */
- is_range = *p == L('-') && p[1] != L('\0');
+ is_range = (*p == L('-') && p[1] != L('\0')
+ && p[1] != L(']'));
if (!is_range && c == fn)
goto matched;