ZXHawk: Fix exception thrown randomly by tape player subsystem

This commit is contained in:
Asnivor 2019-01-02 12:38:32 +00:00
parent 0621db4585
commit 3766e2380c
1 changed files with 2 additions and 3 deletions

View File

@ -624,9 +624,8 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
}
}
// update waitEdge with current position within the current block
_waitEdge = _dataBlocks[_currentDataBlockIndex].DataPeriods[_position];
// update waitEdge with current position within the current block
_waitEdge = _dataBlocks[_currentDataBlockIndex].DataPeriods.Count() > 0 ? _dataBlocks[_currentDataBlockIndex].DataPeriods[_position] : 0;
// flip the current state
FlipTapeState();