From: Paul Eggert Date: Tue, 31 Oct 2000 06:02:53 +0000 (+0000) Subject: (FOLD): Do not assume that characters are unsigned. X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=731cf2666a2f26b5ccfbe67144f83bc237750e57;p=chaz%2Ftar (FOLD): Do not assume that characters are unsigned. --- diff --git a/lib/fnmatch.c b/lib/fnmatch.c index 90930e4..ce55c7f 100644 --- a/lib/fnmatch.c +++ b/lib/fnmatch.c @@ -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') {