mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
Fix problems with running VolumeVerifier on very small disc images
This commit is contained in:
parent
24718c1a38
commit
107291dc5a
@ -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<size_t>(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<size_t>((m_file_size + CLUSTER_SIZE - 1) / CLUSTER_SIZE);
|
||||
|
||||
// Warn if not DVD5 or DVD9 size
|
||||
if (num_clusters != 0x23048 && num_clusters != 0x46090)
|
||||
|
@ -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));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user