diff --git a/src/newgrf.cpp b/src/newgrf.cpp index 4759c8a..11dd296 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -3672,6 +3672,9 @@ static void DuplicateTileTable(AirportSpec *as) HangarTileTable *depot_table = MallocT(as->nof_depots); MemCpyT(depot_table, as->depot_table, as->nof_depots); as->depot_table = depot_table; + Direction *rotation = MallocT(as->num_table); + MemCpyT(rotation, as->rotation, as->num_table); + as->rotation = rotation; } /** @@ -3742,6 +3745,7 @@ static ChangeInfoResult AirportChangeInfo(uint airport, int numinfo, int prop, B case 0x0A: { // Set airport layout as->num_table = buf->ReadByte(); // Number of layaouts + free(as->rotation); as->rotation = MallocT(as->num_table); uint32 defsize = buf->ReadDWord(); // Total size of the definition AirportTileTable **tile_table = CallocT(as->num_table); // Table with tiles to compose the airport