- validate the index argument for GetSavegame and abort if out of range.

This commit is contained in:
Christoph Oelckers 2022-04-16 22:27:59 +02:00
parent 05260d8e8a
commit 2f90f49931

View file

@ -459,6 +459,7 @@ DEFINE_ACTION_FUNCTION(FSavegameManager, SavegameCount)
FSaveGameNode *FSavegameManagerBase::GetSavegame(int i)
{
if ((unsigned)i >= SaveGames.Size()) ThrowAbortException(X_ARRAY_OUT_OF_BOUNDS, "Bad savegame index");
return SaveGames[i];
}