GUAC-726: Fix width calculation math. Do not search for start past column 0.
This commit is contained in:
parent
99cef299f1
commit
98a18f45c4
@ -83,13 +83,13 @@ static void __guac_terminal_force_break(guac_terminal* terminal, int row, int ed
|
|||||||
guac_terminal_char* start_char = &(buffer_row->characters[start_column]);
|
guac_terminal_char* start_char = &(buffer_row->characters[start_column]);
|
||||||
|
|
||||||
/* Determine start column */
|
/* Determine start column */
|
||||||
while (start_column >= 0 && start_char->value == GUAC_CHAR_CONTINUATION) {
|
while (start_column > 0 && start_char->value == GUAC_CHAR_CONTINUATION) {
|
||||||
start_char--;
|
start_char--;
|
||||||
start_column--;
|
start_column--;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Clear character if broken */
|
/* Clear character if broken */
|
||||||
if (start_char->value == GUAC_CHAR_CONTINUATION || start_char->width != start_column - end_column + 1) {
|
if (start_char->value == GUAC_CHAR_CONTINUATION || start_char->width != end_column - start_column + 1) {
|
||||||
|
|
||||||
guac_terminal_char cleared_char;
|
guac_terminal_char cleared_char;
|
||||||
cleared_char.value = ' ';
|
cleared_char.value = ' ';
|
||||||
@ -118,7 +118,7 @@ static void __guac_terminal_force_break(guac_terminal* terminal, int row, int ed
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Clear character if broken */
|
/* Clear character if broken */
|
||||||
if (start_char->value == GUAC_CHAR_CONTINUATION || start_char->width != start_column - end_column + 1) {
|
if (start_char->value == GUAC_CHAR_CONTINUATION || start_char->width != end_column - start_column + 1) {
|
||||||
|
|
||||||
guac_terminal_char cleared_char;
|
guac_terminal_char cleared_char;
|
||||||
cleared_char.value = ' ';
|
cleared_char.value = ' ';
|
||||||
|
Loading…
Reference in New Issue
Block a user