From be29c482f7aa4042f2b4eaf6a55eed299a2d94e2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 27 Oct 2001 00:38:28 +0000 Subject: Update. * posix/fnmatch_loop.c: Recognize - at end of bracket expression correctly. --- posix/fnmatch_loop.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'posix') 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; -- cgit 1.4.1