summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2021-08-10 18:54:45 +0200
committerGitHub <noreply@github.com>2021-08-10 18:54:45 +0200
commitb205a20bb1798a3c1d1664b478e8f6c513efd756 (patch)
tree24c84b5dd34aa4fc2f5b606d2b187fdb5f3c53ed
parent46beaacec3d18c0d5f1d744e2c63ca09f5152c85 (diff)
parente0572f7ef7760bd1ceee2e177284564ff1d97fef (diff)
Merge pull request #51473 from KoBeWi/some_crash_fix_idk
Fix crash when parsing Dictionary
-rw-r--r--modules/gdscript/gdscript_parser.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp
index a500dfd51a..a21167ad95 100644
--- a/modules/gdscript/gdscript_parser.cpp
+++ b/modules/gdscript/gdscript_parser.cpp
@@ -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)) {