]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
UTF-8 processing was discarding a valid character which interrupted
authorSimon Tatham <anakin@pobox.com>
Mon, 3 Oct 2005 11:38:30 +0000 (11:38 +0000)
committerSimon Tatham <anakin@pobox.com>
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.

[originally from svn r6373]

terminal.c

index 432ed936e6a4ee5770575e5d40bd562392d165c7..928f6ed8379ed985dbc775ab60480be822e4e046 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;