extra-modes: fix potential out of bounds access
This commit is contained in:
parent
5d463eb5ad
commit
f106d3dc66
1 changed files with 2 additions and 1 deletions
|
|
@ -2992,8 +2992,9 @@ static void ruby_colorize_line(QEColorizeContext *cp,
|
|||
}
|
||||
if (start == indent
|
||||
|| (str[i] != ' ' && str[i] != '='
|
||||
&& i >= 2
|
||||
&& !qe_isalnum(str[i - 2] & CHAR_MASK)
|
||||
&& str[i - 2] != ')')) {
|
||||
&& (str[i - 2] & CHAR_MASK) != ')')) {
|
||||
/* XXX: should use context to tell regex from divide */
|
||||
/* parse regex */
|
||||
state = IN_RUBY_REGEX;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue