Skip to content

Commit

Permalink
Fix temporary value not released when used as a dictionary key
Browse files Browse the repository at this point in the history
  • Loading branch information
Blackiris committed May 6, 2021
1 parent 4a7679e commit 8252266
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/gdscript/gdscript_compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -966,6 +966,9 @@ GDScriptCodeGenerator::Address GDScriptCompiler::_parse_expression(CodeGen &code
} else {
gen->write_set(prev_base, key, assigned);
}
if (key.mode == GDScriptCodeGenerator::Address::TEMPORARY) {
gen->pop_temporary();
}
if (assigned.mode == GDScriptCodeGenerator::Address::TEMPORARY) {
gen->pop_temporary();
}
Expand Down

0 comments on commit 8252266

Please sign in to comment.