about summary refs log tree commit diff
path: root/posix
diff options
context:
space:
mode:
Diffstat (limited to 'posix')
-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 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;