aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <nyamatongwe@gmail.com>2012-05-15 09:04:55 +1000
committernyamatongwe <nyamatongwe@gmail.com>2012-05-15 09:04:55 +1000
commita0b7a17c46bd0476b672bb40ba4575f5812dfc72 (patch)
tree36a6175252ea2a1dbac05bb69cf0af9875552c4f
parent6bb615ea1489841f718569511f9e83cde2c43ac9 (diff)
downloadscintilla-mirror-a0b7a17c46bd0476b672bb40ba4575f5812dfc72.tar.gz
Avoid assertion failure at end of PHP document.
-rw-r--r--lexers/LexHTML.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/lexers/LexHTML.cxx b/lexers/LexHTML.cxx
index 7534acc8e..ecee57a7d 100644
--- a/lexers/LexHTML.cxx
+++ b/lexers/LexHTML.cxx
@@ -2134,7 +2134,8 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty
break;
default:
StateToPrint = statePrintForState(state, inScriptType);
- styler.ColourTo(lengthDoc - 1, StateToPrint);
+ if (styler.GetStartSegment() < lengthDoc)
+ styler.ColourTo(lengthDoc - 1, StateToPrint);
break;
}