From 835143b7bde0df6fe5bf3b4a4b5c01ccc5d2284e Mon Sep 17 00:00:00 2001 From: Kirill Diduk Date: Thu, 9 Sep 2021 22:40:13 +0200 Subject: [PATCH] #52499 Fix parsing 'preload': increase/decrease parenthesis count --- modules/gdscript/gdscript_parser.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp index 8dd31a5704f5..036d83d42f7b 100644 --- a/modules/gdscript/gdscript_parser.cpp +++ b/modules/gdscript/gdscript_parser.cpp @@ -435,7 +435,9 @@ GDScriptParser::Node *GDScriptParser::_parse_expression(Node *p_parent, bool p_s bool valid = false; ConstantNode *cn; + parenthesis++; Node *subexpr = _parse_and_reduce_expression(p_parent, p_static); + parenthesis--; if (subexpr) { if (subexpr->type == Node::TYPE_CONSTANT) { cn = static_cast(subexpr);