1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 19:48:20 +02:00

Expanded const aggregate compatibility

This commit is contained in:
Brian Fiete 2021-01-18 14:09:16 -08:00
parent 13b943855e
commit f665388e91
17 changed files with 452 additions and 134 deletions

View file

@ -1216,7 +1216,7 @@ void BfModule::PopulateType(BfType* resolvedTypeRef, BfPopulateType populateType
}
if (arrayType->mElementCount > 0)
{
arrayType->mSize = (arrayType->mElementType->GetStride() * ((int)arrayType->mElementCount - 1)) + arrayType->mElementType->mSize;
arrayType->mSize = (int)(arrayType->mElementType->GetStride() * arrayType->mElementCount);
arrayType->mAlign = std::max((int32)arrayType->mElementType->mAlign, 1);
}
else if (arrayType->mElementCount < 0)