mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-12-14 03:59:36 +00:00
Fix memory corruption when creating a new house
This commit is contained in:
@@ -214,7 +214,7 @@ Boolean InitializeEmptyHouse (void)
|
|||||||
if (thisHouse != nil)
|
if (thisHouse != nil)
|
||||||
thisHouse.Dispose();
|
thisHouse.Dispose();
|
||||||
|
|
||||||
const size_t houseSizeNoRooms = sizeof(sizeof(houseType) - sizeof(roomType));
|
const size_t houseSizeNoRooms = sizeof(houseType) - sizeof(roomType);
|
||||||
thisHouse = NewHandle(houseSizeNoRooms).StaticCast<houseType>();
|
thisHouse = NewHandle(houseSizeNoRooms).StaticCast<houseType>();
|
||||||
|
|
||||||
if (thisHouse == nil)
|
if (thisHouse == nil)
|
||||||
|
|||||||
Reference in New Issue
Block a user