summaryrefslogtreecommitdiff
path: root/src/town_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/town_cmd.cpp')
-rw-r--r--src/town_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp
index 986c52c4e..dacf59ddc 100644
--- a/src/town_cmd.cpp
+++ b/src/town_cmd.cpp
@@ -611,7 +611,7 @@ static inline void AddAcceptedCargoSetMask(CargoID cargo, uint amount, CargoArra
static void AddAcceptedCargo_Town(TileIndex tile, CargoArray &acceptance, CargoTypes *always_accepted)
{
const HouseSpec *hs = HouseSpec::Get(GetHouseType(tile));
- CargoID accepts[3];
+ CargoID accepts[lengthof(hs->accepts_cargo)];
/* Set the initial accepted cargo types */
for (uint8 i = 0; i < lengthof(accepts); i++) {