aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Editor.cxx
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2000-07-05 13:49:29 +0000
committernyamatongwe <devnull@localhost>2000-07-05 13:49:29 +0000
commit7becad30859bf44144ec7a35d29dc1500f2670d1 (patch)
treeb034978dc28ba3572c8ac3866c1cdf5b45f6aaa9 /src/Editor.cxx
parent63654a7adf0e2960f63d2e20ccf3900d274fa410 (diff)
downloadscintilla-mirror-7becad30859bf44144ec7a35d29dc1500f2670d1.tar.gz
Fixed BoundsChecker warnings including some leaks.
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r--src/Editor.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index f1c497db2..3cf2c179e 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -735,7 +735,7 @@ void Editor::LayoutLine(int line, Surface *surface, ViewStyle &vstyle, LineLayou
int styleMask = pdoc->stylingBitsMask;
ll.xHighlightGuide = 0;
for (int charInDoc = posLineStart;
- charInDoc < posLineEnd && numCharsInLine < LineLayout::maxLineLength - 1;
+ charInDoc < posLineEnd && numCharsInLine < LineLayout::maxLineLength - 2;
charInDoc++) {
char chDoc = pdoc->CharAt(charInDoc);
styleByte = pdoc->StyleAt(charInDoc);
@@ -749,11 +749,13 @@ void Editor::LayoutLine(int line, Surface *surface, ViewStyle &vstyle, LineLayou
ll.chars[numCharsInLine] = 0;
ll.styles[numCharsInLine] = styleByte; // For eolFilled
ll.indicators[numCharsInLine] = 0;
+ ll.indicators[numCharsInLine+1] = 0;
// Layout the line, determining the position of each character
int startseg = 0;
int startsegx = 0;
ll.positions[0] = 0;
+ ll.positions[numCharsInLine + 1] = 0;
unsigned int tabWidth = vstyle.spaceWidth * pdoc->tabInChars;
for (int charInLine = 0; charInLine < numCharsInLine; charInLine++) {