We shouldn't reference off the end of the display line when checking

for UCSWIDE. Thanks Jacob, for catching this with valgrind.

[originally from svn r4338]
This commit is contained in:
Simon Tatham 2004-07-20 20:13:25 +00:00
Родитель d8f8c3c3bf
Коммит deaeb2a287
1 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -3573,8 +3573,9 @@ static void do_paint(Terminal *term, Context ctx, int may_optimise)
}
tattr |= (tchar & CSET_MASK);
tchar &= CHAR_MASK;
if ((d[1] & (CHAR_MASK | CSET_MASK)) == UCSWIDE)
tattr |= ATTR_WIDE;
if (j < term->cols-1 &&
(d[1] & (CHAR_MASK | CSET_MASK)) == UCSWIDE)
tattr |= ATTR_WIDE;
/* Video reversing things */
if (term->selstate == DRAGGING || term->selstate == SELECTED) {