- fixed: Actions in the saee menu need to do full range checks for the number of currently selected item.

SVN r3126 (trunk)
This commit is contained in:
Christoph Oelckers 2011-01-30 11:20:08 +00:00
parent e523e12d91
commit 82bac3ad22
1 changed files with 2 additions and 2 deletions

View File

@ -753,7 +753,7 @@ bool DLoadSaveMenu::MenuEvent (int mkey, bool fromcontroller)
case MKEY_MBYes:
{
if (Selected != -1)
if (Selected != -1 && Selected < SaveGames.Size())
{
int listindex = SaveGames[0]->bNoDelete? Selected-1 : Selected;
remove (SaveGames[Selected]->Filename.GetChars());
@ -819,7 +819,7 @@ bool DLoadSaveMenu::Responder (event_t *ev)
{
if (ev->subtype == EV_GUI_KeyDown)
{
if (Selected != -1)
if (Selected != -1 && Selected < SaveGames.Size())
{
switch (ev->data1)
{