From a0b7a17c46bd0476b672bb40ba4575f5812dfc72 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Tue, 15 May 2012 09:04:55 +1000 Subject: Avoid assertion failure at end of PHP document. --- lexers/LexHTML.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lexers/LexHTML.cxx') 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; } -- cgit v1.2.3