mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 01:48:00 +00:00
Weaken the assertion in general_textout(). It was failing in the
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. [originally from svn r8403]
This commit is contained in:
parent
6d9f007684
commit
75913faf82
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user