(svn r22843) -Fix [FS#4748]: Harden savegame load against too many ai config settings (monoid)

This commit is contained in:
planetmaker 2011-08-25 16:37:27 +00:00
parent d839aa0475
commit ef09794faa
1 changed files with 2 additions and 0 deletions

View File

@ -66,6 +66,8 @@ static void Load_AIPL()
CompanyID index;
while ((index = (CompanyID)SlIterateArray()) != (CompanyID)-1) {
if (index >= MAX_COMPANIES) SlErrorCorrupt("Too many AI configs");
_ai_saveload_version = -1;
SlObject(NULL, _ai_company);