Fix crash when parsing Dictionary
This commit is contained in:
parent
50d5569ad4
commit
e0572f7ef7
@ -2480,7 +2480,9 @@ GDScriptParser::ExpressionNode *GDScriptParser::parse_dictionary(ExpressionNode
|
|||||||
switch (dictionary->style) {
|
switch (dictionary->style) {
|
||||||
case DictionaryNode::LUA_TABLE:
|
case DictionaryNode::LUA_TABLE:
|
||||||
if (key != nullptr && key->type != Node::IDENTIFIER) {
|
if (key != nullptr && key->type != Node::IDENTIFIER) {
|
||||||
push_error("Expected identifier as dictionary key.");
|
push_error("Expected identifier as LUA-style dictionary key.");
|
||||||
|
advance();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if (!match(GDScriptTokenizer::Token::EQUAL)) {
|
if (!match(GDScriptTokenizer::Token::EQUAL)) {
|
||||||
if (match(GDScriptTokenizer::Token::COLON)) {
|
if (match(GDScriptTokenizer::Token::COLON)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user