diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2022-01-22 20:30:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-22 20:30:54 +0100 |
commit | 182a36db47b1cf935feef69bffde6c0f285a63ec (patch) | |
tree | 42a376487b52a7822e4e60f1bc078babc39d3600 /modules/gdscript/gdscript_parser.cpp | |
parent | 9b9440165b7cf5e62a744bb79f3e6304d75bfc16 (diff) | |
parent | 1a15a3adf6393f70dba41cc6dd4375656b8f0504 (diff) | |
download | redot-engine-182a36db47b1cf935feef69bffde6c0f285a63ec.tar.gz |
Merge pull request #55214 from Scony/fix-gdscript-crash-2
Fix GDScript parser crash on 'dollar mixed with assignment' expression
Diffstat (limited to 'modules/gdscript/gdscript_parser.cpp')
-rw-r--r-- | modules/gdscript/gdscript_parser.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp index 5e210074ed..05253caa8f 100644 --- a/modules/gdscript/gdscript_parser.cpp +++ b/modules/gdscript/gdscript_parser.cpp @@ -2415,6 +2415,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; |