mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-13 17:17:37 -05:00

When we're displaying double-width text as a result of the VT100 ESC#6 escape sequence or its friends, and the terminal width is an odd number of columns, we divide by 2 the number of characters we'll even try to display, and round _down_: if there's a rightmost odd column, it stays blank, and doesn't show the left half of a double-width char. In the GTK redraw function, that rounding-down can set the 'len' variable to zero. But when we're displaying a character with Unicode combining chars on top, that fails an assertion that len == 1, because at the top of the function we set it to 1. The fix is just to return early if len is reduced to zero by that rounding: if we're not displaying any characters, then we don't have to do anything at all.