diff options
Diffstat (limited to 'posix/fnmatch_loop.c')
-rw-r--r-- | posix/fnmatch_loop.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/posix/fnmatch_loop.c b/posix/fnmatch_loop.c index 4c6168ae9f..8bdd9a6063 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; |