Cygwin: fnmatch: fix range comparison in C locale

Commit c36064bbd0 introduced operating on character pointers
instead of operating on characters, to allow collating symbols.
This patch neglected to change the expression for range
comparison in case we're in the C locale.  Thus it suddenly
compared pointers instead of characters.  Fix that.

Fixes: c36064bbd0 ("Cygwin: fnmatch: support collating symbols in [. .] brackets")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen 2023-07-27 21:57:49 +02:00
parent 9e329b544a
commit a13b0b7aea
1 changed files with 1 additions and 1 deletions

View File

@ -353,7 +353,7 @@ rangematch(const wint_t *pattern, wint_t *test, int flags, wint_t **newp,
}
if ((!__get_current_collate_locale ()->win_locale[0]) ?
c <= test && test <= c2 :
*c <= *test && *test <= *c2 :
__wscollate_range_cmp(c, test, clen, tlen) <= 0
&& __wscollate_range_cmp(test, c2, tlen, c2len) <= 0
)