summaryrefslogtreecommitdiff
path: root/src/cargotype.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/cargotype.cpp')
-rw-r--r--src/cargotype.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cargotype.cpp b/src/cargotype.cpp
index 52dd196c8..8421c482e 100644
--- a/src/cargotype.cpp
+++ b/src/cargotype.cpp
@@ -42,8 +42,8 @@ void SetupCargoForClimate(LandscapeID l)
assert(l < lengthof(_default_climate_cargo));
/* Reset and disable all cargo types */
- memset(CargoSpec::array, 0, sizeof(CargoSpec::array));
for (CargoID i = 0; i < lengthof(CargoSpec::array); i++) {
+ *CargoSpec::Get(i) = {};
CargoSpec::Get(i)->bitnum = INVALID_CARGO;
/* Set defaults for newer properties, which old GRFs do not know */