From: ben Date: Sun, 11 Jan 2009 14:20:34 +0000 (+0000) Subject: Propagate my ctype fixes (r8404) from libcharset. X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/commitdiff_plain/be3ed0da8343bdbd68665bef9a9bb096865bea04 Propagate my ctype fixes (r8404) from libcharset. git-svn-id: svn://svn.tartarus.org/sgt/putty@8405 cda61777-01e9-0310-a592-d414129be87e --- diff --git a/charset/localenc.c b/charset/localenc.c index 4d81f50f..22088877 100644 --- a/charset/localenc.c +++ b/charset/localenc.c @@ -102,7 +102,7 @@ int charset_from_localenc(const char *name) p = name; q = localencs[i].name; while (*p || *q) { - if (tolower(*p) != tolower(*q)) + if (tolower((unsigned char)*p) != tolower((unsigned char)*q)) break; p++; q++; } diff --git a/charset/mimeenc.c b/charset/mimeenc.c index 437781f6..93ad89e7 100644 --- a/charset/mimeenc.c +++ b/charset/mimeenc.c @@ -202,7 +202,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++; } diff --git a/charset/xenc.c b/charset/xenc.c index b6532f29..11787978 100644 --- a/charset/xenc.c +++ b/charset/xenc.c @@ -81,7 +81,7 @@ int charset_from_xenc(const char *name) p = name; q = xencs[i].name; while (*p || *q) { - if (tolower(*p) != tolower(*q)) + if (tolower((unsigned char)*p) != tolower((unsigned char)*q)) break; p++; q++; }