diff --git a/lib/roken/strcasecmp.c b/lib/roken/strcasecmp.c index cfca524b7..b2425c989 100644 --- a/lib/roken/strcasecmp.c +++ b/lib/roken/strcasecmp.c @@ -46,13 +46,13 @@ RCSID("$Id$"); int strcasecmp(const char *s1, const char *s2) { - while(toupper(*s1) == toupper(*s2)) { + while(toupper((unsigned char)*s1) == toupper((unsigned char)*s2)) { if(*s1 == '\0') return 0; s1++; s2++; } - return toupper(*s1) - toupper(*s2); + return toupper((unsigned char)*s1) - toupper((unsigned char)*s2); } #endif