diff options
author | frosch <frosch@openttd.org> | 2015-05-09 10:04:50 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2015-05-09 10:04:50 +0000 |
commit | 3f55e5364e69c0ce4d0011371afbad4153fc073e (patch) | |
tree | 2fbced55b3c246e37692d41321b0fa0fef63d514 /src/saveload/newgrf_sl.cpp | |
parent | 5e47c27550efca4c318cfe4b9bdfe51a28bc2984 (diff) | |
download | openttd-3f55e5364e69c0ce4d0011371afbad4153fc073e.tar.xz |
(svn r27278) -Fix: Handle savegames with an unexpected amount of industry-builder or NewGRF entity-mapping more gracefully.
Diffstat (limited to 'src/saveload/newgrf_sl.cpp')
-rw-r--r-- | src/saveload/newgrf_sl.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/saveload/newgrf_sl.cpp b/src/saveload/newgrf_sl.cpp index cdfd0f317..dacc127ea 100644 --- a/src/saveload/newgrf_sl.cpp +++ b/src/saveload/newgrf_sl.cpp @@ -51,7 +51,7 @@ void Load_NewGRFMapping(OverrideManagerBase &mapping) int index; while ((index = SlIterateArray()) != -1) { - if ((uint)index >= max_id) break; + if ((uint)index >= max_id) SlErrorCorrupt("Too many NewGRF entity mappings"); SlObject(&mapping.mapping_ID[index], _newgrf_mapping_desc); } } |