mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-02-10 01:30:50 +00:00
- validate the index argument for GetSavegame and abort if out of range.
This commit is contained in:
parent
05260d8e8a
commit
2f90f49931
1 changed files with 1 additions and 0 deletions
|
@ -459,6 +459,7 @@ DEFINE_ACTION_FUNCTION(FSavegameManager, SavegameCount)
|
||||||
|
|
||||||
FSaveGameNode *FSavegameManagerBase::GetSavegame(int i)
|
FSaveGameNode *FSavegameManagerBase::GetSavegame(int i)
|
||||||
{
|
{
|
||||||
|
if ((unsigned)i >= SaveGames.Size()) ThrowAbortException(X_ARRAY_OUT_OF_BOUNDS, "Bad savegame index");
|
||||||
return SaveGames[i];
|
return SaveGames[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue