Skip to content

Commit

Permalink
Fix crash with combining characters after several cursorRight() calls
Browse files Browse the repository at this point in the history
cursorRight() does not resize the _screenLines vector, leading to an
assert in QVector when trying to look up the _cuX which is bigger than
the amount of characters in the current line.

BUG: 372530
(cherry picked from commit 80b9e07)
  • Loading branch information
sandsmark authored and kurthindenburg committed Nov 24, 2016
1 parent 8d32afa commit 76453a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Screen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ void Screen::displayCharacter(unsigned short c)
return;
}
// Find previous "real character" to try to combine with
int charToCombineWithX = _cuX;
int charToCombineWithX = qMin(_cuX, _screenLines[_cuY].length());
int charToCombineWithY = _cuY;
do {
if (charToCombineWithX > 0) {
Expand Down

0 comments on commit 76453a7

Please sign in to comment.