Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mRemoteNG/PuTTYNG.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2010-09-09 18:32:25 +0400
committerSimon Tatham <anakin@pobox.com>2010-09-09 18:32:25 +0400
commit7531c7d3d49cfa774f6940e69d6210e1565979ad (patch)
treed29b2961198295c032de4f7e960e7a375945fdc1 /ldisc.c
parentcda613000acdc4c5f9555c821ef3463664eebda9 (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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ldisc.c b/ldisc.c
index d57e6d17..f2853f4b 100644
--- a/ldisc.c
+++ b/ldisc.c
@@ -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) {