as unsigned char. This means that passing in a bare char is incorrect on
systems where char is signed. Sprinkle some appropriate casts to prevent
this.
git-svn-id: svn://svn.tartarus.org/sgt/putty@8406
cda61777-01e9-0310-a592-
d414129be87e
void showversion(void)
{
char *verstr = dupstr(ver);
- verstr[0] = tolower(verstr[0]);
+ verstr[0] = tolower((unsigned char)verstr[0]);
printf("PuTTYgen %s\n", verstr);
sfree(verstr);
}
char c;
s++;
size = 0;
- if (*s) switch (c = *s++, tolower(c)) {
+ if (*s) switch (c = *s++, tolower((unsigned char)c)) {
case 'y':
size = strftime(buf, sizeof(buf), "%Y", tm);
break;
if (modifiers & PKM_CONTROL)
c &= 0x1f;
else if (modifiers & PKM_SHIFT)
- c = toupper(c);
+ c = toupper((unsigned char)c);
}
*p++ = c;
goto done;