aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2002-04-23 05:20:36 +0000
committernyamatongwe <devnull@localhost>2002-04-23 05:20:36 +0000
commit2b30ea35f7117bce7bd3936d5e8c7fadac87d072 (patch)
tree503a279c6718a0d9f742ed276726fe23a60100dc
parent7c5a0bd935d1c396d0682cf61625ef9a63f2b42c (diff)
downloadscintilla-mirror-2b30ea35f7117bce7bd3936d5e8c7fadac87d072.tar.gz
Fixed allocation to be larger to avoid Win32 API problem.
-rw-r--r--src/Editor.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index ef813fc05..fa54c2f72 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -65,7 +65,9 @@ void LineLayout::Resize(int maxLineLength_) {
chars = new char[maxLineLength_ + 1];
styles = new char[maxLineLength_ + 1];
indicators = new char[maxLineLength_ + 1];
- positions = new int[maxLineLength_ + 1];
+ // Extra position allocated as sometimes the Windows
+ // GetTextExtentExPoint API writes an extra element.
+ positions = new int[maxLineLength_ + 1 + 1];
maxLineLength = maxLineLength_;
}
}