summaryrefslogtreecommitdiff
path: root/src/newgrf_object.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/newgrf_object.cpp')
-rw-r--r--src/newgrf_object.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/newgrf_object.cpp b/src/newgrf_object.cpp
index 78bbc5244..40a966a16 100644
--- a/src/newgrf_object.cpp
+++ b/src/newgrf_object.cpp
@@ -96,7 +96,9 @@ uint ObjectSpec::Index() const
void ResetObjects()
{
/* Clean the pool. */
- MemSetT(_object_specs, 0, lengthof(_object_specs));
+ for (uint16 i = 0; i < NUM_OBJECTS; i++) {
+ _object_specs[i] = {};
+ }
/* And add our originals. */
MemCpyT(_object_specs, _original_objects, lengthof(_original_objects));