mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-02 03:52:49 -05:00
Arguments to ctype functions are required to be either EOF or representable
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. [originally from svn r8406]
This commit is contained in:
@ -5942,7 +5942,7 @@ void term_key(Terminal *term, Key_Sym keysym, wchar_t *text, size_t tlen,
|
||||
if (modifiers & PKM_CONTROL)
|
||||
c &= 0x1f;
|
||||
else if (modifiers & PKM_SHIFT)
|
||||
c = toupper(c);
|
||||
c = toupper((unsigned char)c);
|
||||
}
|
||||
*p++ = c;
|
||||
goto done;
|
||||
|
Reference in New Issue
Block a user