diff --git a/src/core/cdrom.cpp b/src/core/cdrom.cpp index 102d9d64c..20b02c01c 100644 --- a/src/core/cdrom.cpp +++ b/src/core/cdrom.cpp @@ -2406,8 +2406,9 @@ void CDROM::UpdatePositionWhileSeeking() { DebugAssert(IsSeeking()); - const float completed_frac = 1.0f - (static_cast<float>(s_drive_event->GetTicksUntilNextExecution()) / - static_cast<float>(s_drive_event->GetInterval())); + const float completed_frac = 1.0f - std::min(static_cast<float>(s_drive_event->GetTicksUntilNextExecution()) / + static_cast<float>(s_drive_event->GetInterval()), + 1.0f); CDImage::LBA current_lba; if (s_seek_end_lba > s_seek_start_lba)