mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-25 01:02:24 +00:00
Add missing casts in arguments to ctype functions.
[originally from svn r9962]
This commit is contained in:
parent
61e555ec79
commit
353b85be67
@ -1041,16 +1041,18 @@ int decode_codepage(char *cp_name)
|
|||||||
if (GetCPInfo(codepage, &cpinfo) != 0)
|
if (GetCPInfo(codepage, &cpinfo) != 0)
|
||||||
goto break_break;
|
goto break_break;
|
||||||
}
|
}
|
||||||
if (tolower(*s++) != tolower(*d++))
|
if (tolower((unsigned char)*s++) != tolower((unsigned char)*d++))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
d = cp_name;
|
d = cp_name;
|
||||||
if (tolower(d[0]) == 'c' && tolower(d[1]) == 'p')
|
if (tolower((unsigned char)d[0]) == 'c' &&
|
||||||
|
tolower((unsigned char)d[1]) == 'p')
|
||||||
d += 2;
|
d += 2;
|
||||||
if (tolower(d[0]) == 'i' && tolower(d[1]) == 'b'
|
if (tolower((unsigned char)d[0]) == 'i' &&
|
||||||
&& tolower(d[2]) == 'm')
|
tolower((unsigned char)d[1]) == 'b' &&
|
||||||
|
tolower((unsigned char)d[2]) == 'm')
|
||||||
d += 3;
|
d += 3;
|
||||||
for (s = d; *s >= '0' && *s <= '9'; s++);
|
for (s = d; *s >= '0' && *s <= '9'; s++);
|
||||||
if (*s == 0 && s != d)
|
if (*s == 0 && s != d)
|
||||||
|
Loading…
Reference in New Issue
Block a user