UTF-8 processing was discarding a valid character which interrupted
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Mon, 3 Oct 2005 11:38:30 +0000 (11:38 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Mon, 3 Oct 2005 11:38:30 +0000 (11:38 +0000)
an otherwise legal sequence, if that valid character was the last
thing in a term_out() run. Spotted by Egmont Koblinger.

git-svn-id: svn://svn.tartarus.org/sgt/putty@6373 cda61777-01e9-0310-a592-d414129be87e

terminal.c

index 432ed93..928f6ed 100644 (file)
@@ -2446,7 +2446,7 @@ static void term_out(Terminal *term)
     unget = -1;
 
     chars = NULL;                     /* placate compiler warnings */
-    while (nchars > 0 || bufchain_size(&term->inbuf) > 0) {
+    while (nchars > 0 || unget != -1 || bufchain_size(&term->inbuf) > 0) {
        if (unget == -1) {
            if (nchars == 0) {
                void *ret;