Skip to content
Permalink
Browse files

Merge pull request #8303 from JosJuice/volumeverifier-very-small

Fix problems with running VolumeVerifier on very small disc images
  • Loading branch information...
stenzek committed Aug 9, 2019
2 parents 2df522d + 107291d commit e87a3f91a919fa0a470b5f785b354661dcb1f4d4
Showing with 3 additions and 2 deletions.
  1. +2 −1 Source/Core/DiscIO/DiscScrubber.cpp
  2. +1 −1 Source/Core/DolphinQt/Config/VerifyWidget.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<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));

0 comments on commit e87a3f9

Please sign in to comment.
You can’t perform that action at this time.