TAStudio - fix an exception caused by an out of bounds check

This commit is contained in:
adelikat 2012-09-16 16:22:34 +00:00
parent 8812f4b0fb
commit 5888536ac3
1 changed files with 8 additions and 1 deletions

View File

@ -208,6 +208,8 @@ namespace BizHawk.MultiClient
public bool FrameLagged(int frame)
{
if (frame >= StateFirstIndex && frame <= StateLastIndex && frame <= StateRecords.Count)
{
if (frame < StateRecords.Count)
{
return StateRecords[frame].Lagged;
}
@ -216,6 +218,11 @@ namespace BizHawk.MultiClient
return false;
}
}
else
{
return false;
}
}
#endregion