(svn r27278) -Fix: Handle savegames with an unexpected amount of industry-builder or NewGRF entity-mapping more gracefully.

This commit is contained in:
frosch
2015-05-09 10:04:50 +00:00
parent 5e47c27550
commit 3f55e5364e
3 changed files with 7 additions and 7 deletions

View File

@@ -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);
}
}