diff --git a/TextEditor.cpp b/TextEditor.cpp index 02966f0b..37adc769 100644 --- a/TextEditor.cpp +++ b/TextEditor.cpp @@ -2335,7 +2335,7 @@ void TextEditor::ColorizeInternal() { withinSingleLineComment = true; } - else if (!withinSingleLineComment && currentIndex + startStr.size() <= line.size() && + else if (startStr.size() != 0 && !withinSingleLineComment && currentIndex + startStr.size() <= line.size() && equals(startStr.begin(), startStr.end(), from, from + startStr.size(), pred)) { commentStartLine = currentLine;