aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Editor.cxx
diff options
context:
space:
mode:
authornyamatongwe <unknown>2012-01-23 18:19:52 +1100
committernyamatongwe <unknown>2012-01-23 18:19:52 +1100
commit7f3192f972e834d9cbfdde86a84bcabf56d1e291 (patch)
treeea4d3a64149463f0b7fca2c2310a985f1de759a5 /src/Editor.cxx
parent261cba92fb26e10342ee21d41d75d97619ab66da (diff)
downloadscintilla-mirror-7f3192f972e834d9cbfdde86a84bcabf56d1e291.tar.gz
Avoid laying out beyond end of document. Bug #3476637.
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r--src/Editor.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index 4fce8bb2d..1e7df0320 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -6701,7 +6701,7 @@ void Editor::SetBraceHighlight(Position pos0, Position pos1, int matchStyle) {
void Editor::SetAnnotationHeights(int start, int end) {
if (vs.annotationVisible) {
bool changedHeight = false;
- for (int line=start; line<end; line++) {
+ for (int line=start; line<end && line<pdoc->LinesTotal(); line++) {
int linesWrapped = 1;
if (wrapState != eWrapNone) {
AutoSurface surface(this);