ctype functions require their argument to be EOF or representable as an
[sgt/charset] / mimeenc.c
index e0ace12..d3471d0 100644 (file)
--- a/mimeenc.c
+++ b/mimeenc.c
@@ -323,7 +323,7 @@ int charset_from_mimeenc(const char *name)
        p = name;
        q = mimeencs[i].name;
        while (*p || *q) {
-           if (tolower(*p) != tolower(*q))
+               if (tolower((unsigned char)*p) != tolower((unsigned char)*q))
                break;
            p++; q++;
        }