diff options
-rw-r--r-- | src/Editor.cxx | 4 |
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_; } } |