diff --git a/Source/Core/DiscIO/DiscScrubber.cpp b/Source/Core/DiscIO/DiscScrubber.cpp index 0c944a782a..121f5dbe25 100644 --- a/Source/Core/DiscIO/DiscScrubber.cpp +++ b/Source/Core/DiscIO/DiscScrubber.cpp @@ -44,7 +44,8 @@ bool DiscScrubber::SetupScrub(const Volume* disc, int block_size) m_file_size = m_disc->GetSize(); - const size_t num_clusters = static_cast(m_file_size / CLUSTER_SIZE); + // Round up when diving by CLUSTER_SIZE, otherwise MarkAsUsed might write out of bounds + const size_t num_clusters = static_cast((m_file_size + CLUSTER_SIZE - 1) / CLUSTER_SIZE); // Warn if not DVD5 or DVD9 size if (num_clusters != 0x23048 && num_clusters != 0x46090) diff --git a/Source/Core/DolphinQt/Config/VerifyWidget.cpp b/Source/Core/DolphinQt/Config/VerifyWidget.cpp index dd96c6ba9b..8fc16d5a66 100644 --- a/Source/Core/DolphinQt/Config/VerifyWidget.cpp +++ b/Source/Core/DolphinQt/Config/VerifyWidget.cpp @@ -117,7 +117,7 @@ void VerifyWidget::Verify() verifier.Finish(); DiscIO::VolumeVerifier::Result result = verifier.GetResult(); - progress->setValue(verifier.GetBytesProcessed() / DIVISOR); + progress->reset(); m_summary_text->setText(QString::fromStdString(result.summary_text));