#52499 Fix parsing 'preload': increase/decrease parenthesis count

This commit is contained in:
Kirill Diduk 2021-09-09 22:40:13 +02:00
parent 76693aa364
commit 835143b7bd

View file

@ -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<ConstantNode *>(subexpr);