mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 11:38:21 +02:00
CreateMemSet const protection
This commit is contained in:
parent
48a988ff70
commit
715e2dcaf9
1 changed files with 1 additions and 1 deletions
|
@ -15952,7 +15952,7 @@ void BfExprEvaluator::CreateObject(BfObjectCreateExpression* objCreateExpr, BfAs
|
|||
}
|
||||
|
||||
mModule->mBfIRBuilder->PopulateType(resultType);
|
||||
if (!resultType->IsValuelessType())
|
||||
if ((!resultType->IsValuelessType()) && (!addr.IsConst()))
|
||||
{
|
||||
mModule->mBfIRBuilder->CreateMemSet(mModule->CreateIndexedValue(resultType, addr, clearFromIdx),
|
||||
mModule->mBfIRBuilder->CreateConst(BfTypeCode_Int8, isUninit ? 0xCC : 0), clearBytes, resultType->mAlign);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue