CDROM: Fix overflow in UpdatePositionWhileSeeking()
This commit is contained in:
parent
b76af42acc
commit
3395853ba2
|
@ -2406,8 +2406,9 @@ void CDROM::UpdatePositionWhileSeeking()
|
||||||
{
|
{
|
||||||
DebugAssert(IsSeeking());
|
DebugAssert(IsSeeking());
|
||||||
|
|
||||||
const float completed_frac = 1.0f - (static_cast<float>(s_drive_event->GetTicksUntilNextExecution()) /
|
const float completed_frac = 1.0f - std::min(static_cast<float>(s_drive_event->GetTicksUntilNextExecution()) /
|
||||||
static_cast<float>(s_drive_event->GetInterval()));
|
static_cast<float>(s_drive_event->GetInterval()),
|
||||||
|
1.0f);
|
||||||
|
|
||||||
CDImage::LBA current_lba;
|
CDImage::LBA current_lba;
|
||||||
if (s_seek_end_lba > s_seek_start_lba)
|
if (s_seek_end_lba > s_seek_start_lba)
|
||||||
|
|
Loading…
Reference in New Issue