aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2010-08-29 21:40:07 +1000
committernyamatongwe <devnull@localhost>2010-08-29 21:40:07 +1000
commit903d7d0fa647044472c297178ea85f9629091819 (patch)
treee37aaa0c763e64f891d152117442d26b20f2614f /src
parentdfbb1eed1a151a751876bd99a77a06ffcdf879f1 (diff)
downloadscintilla-mirror-903d7d0fa647044472c297178ea85f9629091819.tar.gz
Fixed crash when lexer asks for line state of negative line. Better to just return 0.
Diffstat (limited to 'src')
-rw-r--r--src/PerLine.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/PerLine.cxx b/src/PerLine.cxx
index 59d7882cd..8fc6e2531 100644
--- a/src/PerLine.cxx
+++ b/src/PerLine.cxx
@@ -322,6 +322,8 @@ int LineState::SetLineState(int line, int state) {
}
int LineState::GetLineState(int line) {
+ if (line < 0)
+ return 0;
lineStates.EnsureLength(line + 1);
return lineStates[line];
}