1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-27 02:02:26 +00:00

Ignore the zero byte at the start of the rlogin main protocol

[originally from svn r920]
This commit is contained in:
Simon Tatham 2001-02-01 14:09:00 +00:00
parent c3c0db0c0f
commit 1e2b9ced01

View File

@ -49,8 +49,22 @@ static int rlogin_receive (Socket skt, int urgent, char *data, int len) {
* on 0x10 and 0x20 respectively. I'm not convinced it's * on 0x10 and 0x20 respectively. I'm not convinced it's
* worth it... * worth it...
*/ */
} else {
/*
* Main rlogin protocol. This is really simple: the first
* byte is expected to be NULL and is ignored, and the rest
* is printed.
*/
static int firstbyte = 1;
if (firstbyte) {
if (data[0] == '\0') {
data++;
len--;
}
firstbyte = 0;
}
c_write(data, len);
} }
c_write(data, len);
return 1; return 1;
} }