diff options
author | Simon Tatham <anakin@pobox.com> | 2010-09-09 18:32:25 +0400 |
---|---|---|
committer | Simon Tatham <anakin@pobox.com> | 2010-09-09 18:32:25 +0400 |
commit | 7531c7d3d49cfa774f6940e69d6210e1565979ad (patch) | |
tree | d29b2961198295c032de4f7e960e7a375945fdc1 /ldisc.c | |
parent | cda613000acdc4c5f9555c821ef3463664eebda9 (diff) |
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]
Diffstat (limited to 'ldisc.c')
-rw-r--r-- | ldisc.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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) { |