From 9d3ab46800a271f530da719a77289ca2f29d3c9b Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Mon, 3 Oct 2005 11:38:30 +0000 Subject: [PATCH] UTF-8 processing was discarding a valid character which interrupted 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terminal.c b/terminal.c index 432ed936..928f6ed8 100644 --- a/terminal.c +++ b/terminal.c @@ -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;