Weaken the assertion in general_textout(). It was failing in the
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Fri, 9 Jan 2009 18:55:45 +0000 (18:55 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Fri, 9 Jan 2009 18:55:45 +0000 (18:55 +0000)
case of double-width text (ESC # 3, ESC # 4, ESC # 6), because the
string passed to it was not truncated to the same width as the
clipping rectangle. (In fact, it _can't_ reliably be, in the case
where the window width is odd.) So instead we just assert that we
managed to _at least_ fill the clipping rectangle, not that we
exactly filled it.

The problem is easily reproduced by sending ESC # 8 (fill the screen
with Es) followed by ESC # 3. It doesn't typically happen, though,
if you _manually_ fill the screen with Es, because in that case
PuTTY's terminal buffer ends up being filled with CSET_ACP | 'E' or
similar, which means that general_textout() never gets called
because one of the other branches of do_text_internal() does the
work instead. ESC # 8 will fill the terminal buffer with genuine
_Unicode_ 'E' characters, which exercises the failing code path.

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

windows/window.c

index fe16c94..b2dd5e6 100644 (file)
@@ -1325,7 +1325,7 @@ debug(("\n           rect: [%d,%d %d,%d]\n", newrc.left, newrc.top, newrc.right,
 #ifdef FIXME_REMOVE_BEFORE_CHECKIN
 debug(("general_textout: done, xn=%d\n", xn));
 #endif
-    assert(xn - x == lprc->right - lprc->left);
+    assert(xn - x >= lprc->right - lprc->left);
 }
 
 /*