1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-14 22:34:09 +02:00

Valgrind delete fix

This commit is contained in:
Brian Fiete 2024-10-21 14:15:51 -04:00
parent d034dbc991
commit 1dc6c903ee

View file

@ -137,13 +137,13 @@ struct BfVariant
~BfVariant() ~BfVariant()
{ {
if (mTypeCode == BfTypeCode_Struct) if (mTypeCode == BfTypeCode_Struct)
delete (uint8*)mPtr; delete [] (uint8*)mPtr;
} }
BfVariant& operator=(const BfVariant& variant) BfVariant& operator=(const BfVariant& variant)
{ {
if (mTypeCode == BfTypeCode_Struct) if (mTypeCode == BfTypeCode_Struct)
delete (uint8*)mPtr; delete [] (uint8*)mPtr;
mTypeCode = variant.mTypeCode; mTypeCode = variant.mTypeCode;
mWarnType = variant.mWarnType; mWarnType = variant.mWarnType;
mUInt64 = variant.mUInt64; mUInt64 = variant.mUInt64;