1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 11:38:21 +02:00

Fixed erroneous tempaddr takeover in var decl

This commit is contained in:
Brian Fiete 2020-06-16 07:50:00 -07:00
parent eccd691079
commit cbacf99a61

View file

@ -1546,7 +1546,7 @@ BfLocalVariable* BfModule::HandleVariableDeclaration(BfVariableDeclaration* varD
unresolvedType = initValue.mType;
resolvedType = unresolvedType;
if (initValue.IsTempAddr())
if ((initValue.IsTempAddr()) && (!localDef->mAddr) && (initValue.mType == resolvedType))
{
// Take over value
localDef->mAddr = initValue.mValue;