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
commitc39222beff14c178de0b1ada866ed6f692a2f47d (patch)
tree043c3bbf40f4ddae89cfdf895e5629d6a9471e2b
parent2ff1f3bb916b238344f10c3417a7301756f78a4a (diff)
downloadscintilla-mirror-c39222beff14c178de0b1ada866ed6f692a2f47d.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;
}