[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [konsole/Applications/16.12] src: Fix crash with combining characters after several cursorRight() ca
From: Kurt Hindenburg <kurt.hindenburg () gmail ! com>
Date: 2016-11-24 14:47:45
Message-ID: E1c9vJR-0004RX-0m () code ! kde ! org
[Download RAW message or body]
Git commit 76453a7df8427048a8ce92169c3dbd172f89798c by Kurt Hindenburg, on behalf of Martin T. H. Sandsmark.
Committed on 24/11/2016 at 14:42.
Pushed by hindenburg into branch 'Applications/16.12'.
Fix crash with combining characters after several cursorRight() calls
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 80b9e0775ecc81a4462e932be7ffdb1e5b222a4d)
M +1 -1 src/Screen.cpp
https://commits.kde.org/konsole/76453a7df8427048a8ce92169c3dbd172f89798c
diff --git a/src/Screen.cpp b/src/Screen.cpp
index cc8daa3..d674017 100644
--- a/src/Screen.cpp
+++ b/src/Screen.cpp
@@ -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) {
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic