Merge pull request #51473 from KoBeWi/some_crash_fix_idk
Fix crash when parsing Dictionary
This commit is contained in:
commit
b205a20bb1
1 changed files with 3 additions and 1 deletions
|
@ -2480,7 +2480,9 @@ GDScriptParser::ExpressionNode *GDScriptParser::parse_dictionary(ExpressionNode
|
|||
switch (dictionary->style) {
|
||||
case DictionaryNode::LUA_TABLE:
|
||||
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::COLON)) {
|
||||
|
|
Loading…
Reference in a new issue