oops, but it shouldn't have to do this...

This commit is contained in:
adelikat 2013-10-28 00:47:12 +00:00
parent 795c624ab2
commit 21bab46674
1 changed files with 16 additions and 9 deletions

View File

@ -369,25 +369,32 @@ namespace BizHawk.Client.Common
public string GetInput(int frame)
{
int getframe;
if (_loopOffset.HasValue)
if (frame >= 0)
{
if (frame < _log.Length)
int getframe;
if (_loopOffset.HasValue)
{
getframe = frame;
if (frame < _log.Length)
{
getframe = frame;
}
else
{
getframe = ((frame - _loopOffset.Value) % (_log.Length - _loopOffset.Value)) + _loopOffset.Value;
}
}
else
{
getframe = ((frame - _loopOffset.Value) % (_log.Length - _loopOffset.Value)) + _loopOffset.Value;
getframe = frame;
}
return _log[getframe];
}
else
{
getframe = frame;
return String.Empty;
}
return _log[getframe];
}
public void ModifyFrame(string record, int frame)