(FOLD): Do not assume that characters are unsigned.

This commit is contained in:
Paul Eggert
2000-10-31 06:02:53 +00:00
parent 04182eb50c
commit 731cf2666a

View File

@@ -61,7 +61,9 @@ fnmatch (const char *pattern, const char *string, int flags)
register char c;
/* Note that this evaluates C many times. */
# define FOLD(c) ((flags & FNM_CASEFOLD) && ISUPPER (c) ? tolower (c) : (c))
# define FOLD(c) ((flags & FNM_CASEFOLD) && ISUPPER ((unsigned char) (c)) \
? tolower ((unsigned char) (c)) \
: (c))
while ((c = *p++) != '\0')
{