1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-09 20:12:21 +02:00

Fixed float const aggregates

This commit is contained in:
Brian Fiete 2019-11-28 09:10:40 -08:00
parent ac77923a33
commit a94b52ff58

View file

@ -443,10 +443,14 @@ void BeConstant::GetData(Array<uint8>& data)
for (int i = 0; i < type->mSize; i++) for (int i = 0; i < type->mSize; i++)
data.push_back(0); // Aggregate data.push_back(0); // Aggregate
} }
else if (type->mTypeCode == BeTypeCode_Float)
{
float f = mDouble;
data.Insert(data.mSize, (uint8*)&f, sizeof(float));
}
else else
{ {
for (int i = 0; i < type->mSize; i++) data.Insert(data.mSize, &mUInt8, type->mSize);
data.push_back((&mUInt8)[i]);
} }
} }