- Fixed crash with quicksave rotation enabled (read out of array bounds).

This commit is contained in:
drfrag 2019-10-04 17:07:39 +02:00
parent d25557597b
commit 8227e795c5

View file

@ -149,7 +149,7 @@ int FSavegameManager::InsertSaveNode(FSaveGameNode *node)
{
if (strstr(node->Filename.GetChars(),"quick"))
{
for (i; strstr(SaveGames[i]->Filename.GetChars(),"auto"); i++) {}
for (i; i < SaveGames.Size() && strstr(SaveGames[i]->Filename.GetChars(),"auto"); i++) {}
}
}
}