diff options
author | Julien Nguyen <julien.nguyen3@gmail.com> | 2021-04-04 19:03:15 +0200 |
---|---|---|
committer | Julien Nguyen <julien.nguyen3@gmail.com> | 2021-04-04 19:03:15 +0200 |
commit | 3168c2a51392e5261ce56de8eb530350d5218d0f (patch) | |
tree | b5636bcade5e159723b457b56f7843c5cc2d1ed0 /modules | |
parent | a864a703ee27065795c6297aaeb72ed753d0f279 (diff) |
Fix GDScript variables addresses getting mixed
Diffstat (limited to 'modules')
-rw-r--r-- | modules/gdscript/gdscript_compiler.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/gdscript/gdscript_compiler.cpp b/modules/gdscript/gdscript_compiler.cpp index 62bb6a9f9e..1c7a168eba 100644 --- a/modules/gdscript/gdscript_compiler.cpp +++ b/modules/gdscript/gdscript_compiler.cpp @@ -778,6 +778,10 @@ GDScriptCodeGenerator::Address GDScriptCompiler::_parse_expression(CodeGen &code gen->pop_temporary(); } } + + if (operand.mode == GDScriptCodeGenerator::Address::TEMPORARY) { + gen->pop_temporary(); + } } break; default: { GDScriptCodeGenerator::Address left_operand = _parse_expression(codegen, r_error, binary->left_operand); |