From 1a15a3adf6393f70dba41cc6dd4375656b8f0504 Mon Sep 17 00:00:00 2001 From: Pawel Lampe Date: Sun, 21 Nov 2021 21:17:35 +0100 Subject: Fix GDScript parser crash on 'dollar mixed with assignment' expression fixes #53696 --- modules/gdscript/gdscript_parser.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'modules/gdscript/gdscript_parser.cpp') diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp index bde6783322..69fa793059 100644 --- a/modules/gdscript/gdscript_parser.cpp +++ b/modules/gdscript/gdscript_parser.cpp @@ -2420,6 +2420,9 @@ GDScriptParser::ExpressionNode *GDScriptParser::parse_assignment(ExpressionNode push_error("Assignment is not allowed inside an expression."); return parse_expression(false); // Return the following expression. } + if (p_previous_operand == nullptr) { + return parse_expression(false); // Return the following expression. + } #ifdef DEBUG_ENABLED VariableNode *source_variable = nullptr; -- cgit v1.2.3