Fix memory corruption when creating a new house

This commit is contained in:
elasota
2021-05-11 19:40:46 -04:00
parent 781c6ce610
commit e7b02f37a5

View File

@@ -214,7 +214,7 @@ Boolean InitializeEmptyHouse (void)
if (thisHouse != nil)
thisHouse.Dispose();
const size_t houseSizeNoRooms = sizeof(sizeof(houseType) - sizeof(roomType));
const size_t houseSizeNoRooms = sizeof(houseType) - sizeof(roomType);
thisHouse = NewHandle(houseSizeNoRooms).StaticCast<houseType>();
if (thisHouse == nil)