You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
Fix corrupt scene when export var has setter
This commit is contained in:
@@ -811,6 +811,7 @@ GDScriptParser::VariableNode *GDScriptParser::parse_variable(bool p_allow_proper
|
|||||||
|
|
||||||
VariableNode *variable = alloc_node<VariableNode>();
|
VariableNode *variable = alloc_node<VariableNode>();
|
||||||
variable->identifier = parse_identifier();
|
variable->identifier = parse_identifier();
|
||||||
|
variable->export_info.name = variable->identifier->name;
|
||||||
|
|
||||||
if (match(GDScriptTokenizer::Token::COLON)) {
|
if (match(GDScriptTokenizer::Token::COLON)) {
|
||||||
if (check(GDScriptTokenizer::Token::NEWLINE)) {
|
if (check(GDScriptTokenizer::Token::NEWLINE)) {
|
||||||
@@ -860,8 +861,6 @@ GDScriptParser::VariableNode *GDScriptParser::parse_variable(bool p_allow_proper
|
|||||||
|
|
||||||
end_statement("variable declaration");
|
end_statement("variable declaration");
|
||||||
|
|
||||||
variable->export_info.name = variable->identifier->name;
|
|
||||||
|
|
||||||
return variable;
|
return variable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user