diff options
author | smatz <smatz@openttd.org> | 2009-02-24 22:25:23 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2009-02-24 22:25:23 +0000 |
commit | 846044ee26f68875e8146fe2b00a45071bc66644 (patch) | |
tree | 2a7fbbbb5b49230ad93df79d2e2988128b932842 /src/newgrf_commons.cpp | |
parent | 286039939734152914ae0b5ffe3a9fd59179262d (diff) | |
download | openttd-846044ee26f68875e8146fe2b00a45071bc66644.tar.xz |
(svn r15571) -Fix: incorrect use of memset
Diffstat (limited to 'src/newgrf_commons.cpp')
-rw-r--r-- | src/newgrf_commons.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/newgrf_commons.cpp b/src/newgrf_commons.cpp index 0b1e26a58..b96d6aedf 100644 --- a/src/newgrf_commons.cpp +++ b/src/newgrf_commons.cpp @@ -26,7 +26,7 @@ OverrideManagerBase::OverrideManagerBase(uint16 offset, uint16 maximum, uint16 i mapping_ID = CallocT<EntityIDMapping>(max_new_entities); entity_overrides = MallocT<uint16>(max_offset); - memset(entity_overrides, invalid, sizeof(entity_overrides)); + for (size_t i = 0; i < max_offset; i++) entity_overrides[i] = invalid; grfid_overrides = CallocT<uint32>(max_offset); } |