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

Missing 'this' local variable protection

This commit is contained in:
Brian Fiete 2023-04-17 09:43:51 -07:00
parent 893beb432f
commit 0738fa8ce9

View file

@ -17878,7 +17878,8 @@ void BfModule::EmitCtorBody(bool& skipBody)
}
// Zero out memory for default ctor
if ((methodDeclaration == NULL) && (mCurTypeInstance->IsStruct()) && (methodInstance->mChainType != BfMethodChainType_ChainMember))
if ((methodDeclaration == NULL) && (mCurTypeInstance->IsStruct()) && (methodInstance->mChainType != BfMethodChainType_ChainMember) &&
(!mCurMethodState->mLocals.IsEmpty()))
{
if (mCurTypeInstance->IsTypedPrimitive())
{