aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <unknown>2002-04-23 05:20:36 +0000
committernyamatongwe <unknown>2002-04-23 05:20:36 +0000
commitc72f0f1891e4dd8b50b77c6712338e51e6eb0e17 (patch)
tree503a279c6718a0d9f742ed276726fe23a60100dc /src
parent0f00c7304e8f28583df3b85739d9f988be404887 (diff)
downloadscintilla-mirror-c72f0f1891e4dd8b50b77c6712338e51e6eb0e17.tar.gz
Fixed allocation to be larger to avoid Win32 API problem.
Diffstat (limited to 'src')
-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_;
}
}