You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-18 14:21:41 +00:00
Make 'is_attribute' false during parse error to prevent crash
This commit is contained in:
@@ -2692,12 +2692,13 @@ GDScriptParser::ExpressionNode *GDScriptParser::parse_attribute(ExpressionNode *
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
attribute->is_attribute = true;
|
|
||||||
attribute->base = p_previous_operand;
|
attribute->base = p_previous_operand;
|
||||||
|
|
||||||
if (!consume(GDScriptTokenizer::Token::IDENTIFIER, R"(Expected identifier after "." for attribute access.)")) {
|
if (!consume(GDScriptTokenizer::Token::IDENTIFIER, R"(Expected identifier after "." for attribute access.)")) {
|
||||||
return attribute;
|
return attribute;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
attribute->is_attribute = true;
|
||||||
attribute->attribute = parse_identifier();
|
attribute->attribute = parse_identifier();
|
||||||
|
|
||||||
return attribute;
|
return attribute;
|
||||||
|
|||||||
Reference in New Issue
Block a user