Merge pull request #47627 from Blackiris/fix-gdscript-var-address

Fix GDScript variables addresses getting mixed
This commit is contained in:
Rémi Verschelde 2021-04-05 11:55:47 +02:00 committed by GitHub
commit e0b24467f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);