diff options
| author | JosJuice <josjuice@gmail.com> | 2019-08-06 21:17:40 +0200 |
|---|---|---|
| committer | JosJuice <josjuice@gmail.com> | 2021-03-22 20:05:11 +0100 |
| commit | bbacefeb7592cad86728b6e01e7edf0013543653 (patch) | |
| tree | 1dafac06065e7d24cce741077933361f2c84c2f9 /Source/Core/DiscIO/VolumeVerifier.cpp | |
| parent | 10e1acf25cecc4deb1e11fdbda587761652b0c95 (diff) | |
VolumeVerifier: Handle contents overlapping
This can't actually happen in practice due to how WAD files work,
but it's very easy to add support for thanks to the last commit,
so we might as well add support for it.
Diffstat (limited to 'Source/Core/DiscIO/VolumeVerifier.cpp')
| -rw-r--r-- | Source/Core/DiscIO/VolumeVerifier.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/Core/DiscIO/VolumeVerifier.cpp b/Source/Core/DiscIO/VolumeVerifier.cpp index 275f351908..3ca2f1e2a3 100644 --- a/Source/Core/DiscIO/VolumeVerifier.cpp +++ b/Source/Core/DiscIO/VolumeVerifier.cpp @@ -1095,6 +1095,12 @@ void VolumeVerifier::Process() m_volume.GetTMD(PARTITION_NONE).GetContent(m_content_index, &content); bytes_to_read = Common::AlignUp(content.size, 0x40); content_read = true; + + if (m_content_index + 1 < m_content_offsets.size() && + m_content_offsets[m_content_index + 1] < m_progress + bytes_to_read) + { + excess_bytes = m_progress + bytes_to_read - m_content_offsets[m_content_index + 1]; + } } else if (m_content_index < m_content_offsets.size() && m_content_offsets[m_content_index] > m_progress) |
