aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/LexHTML.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/LexHTML.cxx')
-rw-r--r--src/LexHTML.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/LexHTML.cxx b/src/LexHTML.cxx
index f5be5fa2d..fe9516357 100644
--- a/src/LexHTML.cxx
+++ b/src/LexHTML.cxx
@@ -1602,8 +1602,9 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty
styler.ColourTo(i - 1, StateToPrint);
state = SCE_HPHP_HSTRING_VARIABLE;
} else if (styler.Match(i, phpStringDelimiter)) {
- if ((strlen(phpStringDelimiter) > 1) && (i + static_cast<int>(strlen(phpStringDelimiter)) < lengthDoc))
- i += strlen(phpStringDelimiter) - 1;
+ const int psdLength = strlen(phpStringDelimiter);
+ if ((psdLength > 1) && ((i + psdLength) < lengthDoc))
+ i += psdLength - 1;
styler.ColourTo(i, StateToPrint);
state = SCE_HPHP_DEFAULT;
}