]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Stop IAC IAC from being swallowed in telnet (fix due to Robert de Bath)
authorSimon Tatham <anakin@pobox.com>
Mon, 4 Oct 1999 14:20:17 +0000 (14:20 +0000)
committerSimon Tatham <anakin@pobox.com>
Mon, 4 Oct 1999 14:20:17 +0000 (14:20 +0000)
[originally from svn r232]

telnet.c

index 00b081bdef6c673f0ca7a5063f7b04f18351cd6e..20341cd3aaa9fc4e765104263cc5c2f6f739a547 100644 (file)
--- a/telnet.c
+++ b/telnet.c
@@ -410,7 +410,12 @@ static void do_telnet_read (char *buf, int len) {
            else if (c == WILL) telnet_state = SEENWILL;
            else if (c == WONT) telnet_state = SEENWONT;
            else if (c == SB) telnet_state = SEENSB;
-           else telnet_state = TOPLEVEL;/* ignore _everything_ else! */
+           else {
+               /* ignore (and print) everything else */
+               b[0] = c;
+               c_write(b,1);
+               telnet_state = TOPLEVEL;
+           }
            break;
          case SEENWILL:
            proc_rec_opt (WILL, c);