mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 09:58:01 +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:
parent
cda613000a
commit
7531c7d3d4
2
ldisc.c
2
ldisc.c
@ -147,7 +147,7 @@ void ldisc_send(void *handle, char *buf, int len, int interactive)
|
|||||||
if (EDITING) {
|
if (EDITING) {
|
||||||
while (len--) {
|
while (len--) {
|
||||||
int c;
|
int c;
|
||||||
c = *buf++ + keyflag;
|
c = (unsigned char)(*buf++) + keyflag;
|
||||||
if (!interactive && c == '\r')
|
if (!interactive && c == '\r')
|
||||||
c += KCTRL('@');
|
c += KCTRL('@');
|
||||||
switch (ldisc->quotenext ? ' ' : c) {
|
switch (ldisc->quotenext ? ' ' : c) {
|
||||||
|
Loading…
Reference in New Issue
Block a user