From: simon Date: Fri, 1 Jun 2012 06:50:37 +0000 (+0000) Subject: Fix a bug in cygtermd, spotted by Casey Zacek, in which we X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/commitdiff_plain/925940702282174d1ae0def318fb72d7f39507a6 Fix a bug in cygtermd, spotted by Casey Zacek, in which we unconditionally set the telnet state to SEENCR regardless of whether we have actually seen a CR, and as a result sending a NUL through PuTTY (via Ctrl-Space or whatever) does not work. Must have arisen through some kind of really weird cut-and-paste error! git-svn-id: svn://svn.tartarus.org/sgt/putty@9545 cda61777-01e9-0310-a592-d414129be87e --- diff --git a/contrib/cygtermd/telnet.c b/contrib/cygtermd/telnet.c index 9fd40706..7aec0aab 100644 --- a/contrib/cygtermd/telnet.c +++ b/contrib/cygtermd/telnet.c @@ -424,7 +424,10 @@ void telnet_from_net(Telnet telnet, char *buf, int len) char cc = c; sel_write(telnet->pty, &cc, 1); - telnet->state = SEENCR; + if (c == CR) + telnet->state = SEENCR; + else + telnet->state = TOP_LEVEL; } break; case SEENIAC: