1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00

Cast incoming characters to unsigned char to avoid accidental sign

extension. Since ldisc_send() uses bit 8 as an internal flag, we
shouldn't be setting it except when we really want to.

[originally from svn r8989]
This commit is contained in:
Simon Tatham 2010-09-09 14:32:25 +00:00
parent cda613000a
commit 7531c7d3d4

View File

@ -147,7 +147,7 @@ void ldisc_send(void *handle, char *buf, int len, int interactive)
if (EDITING) {
while (len--) {
int c;
c = *buf++ + keyflag;
c = (unsigned char)(*buf++) + keyflag;
if (!interactive && c == '\r')
c += KCTRL('@');
switch (ldisc->quotenext ? ' ' : c) {