diff --git a/scintilla/lexers/LexUser.cxx b/scintilla/lexers/LexUser.cxx index 2529f9d9..491e6310 100644 --- a/scintilla/lexers/LexUser.cxx +++ b/scintilla/lexers/LexUser.cxx @@ -635,13 +635,13 @@ static inline void SubGroup(const char * s, vvstring & vec, bool group=false) for (unsigned int j=0; j= 2 && s[0] == '(' && s[1] == '(') { i = 2; group = true; } - if (s[length-1] == ')' && s[length-2] == ')') + if (length >= 2 && s[length - 1] == ')' && s[length - 2] == ')') length -= 2; if (!group && *s)