Skip to content
Snippets Groups Projects
Commit 933ef8cf authored by Erik Verbruggen's avatar Erik Verbruggen
Browse files

Added bounds check.

parent b737fb86
No related branches found
No related tags found
No related merge requests found
......@@ -136,7 +136,7 @@ int ExpressionUnderCursor::startOfExpression_helper(BackwardsScanner &tk, int in
// [receiver messageParam1:expression messageParam2:expression messageParam3
// ... etc
int i = index - 1;
while (tk[i].isNot(T_EOF_SYMBOL)) {
while (i >= 0 && tk[i].isNot(T_EOF_SYMBOL)) {
if (tk[i].is(T_LBRACKET))
break;
if (tk[i].is(T_LBRACE) || tk[i].is(T_RBRACE))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment