From c72f0f1891e4dd8b50b77c6712338e51e6eb0e17 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Tue, 23 Apr 2002 05:20:36 +0000 Subject: Fixed allocation to be larger to avoid Win32 API problem. --- src/Editor.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') 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_; } } -- cgit v1.2.3