diff options
| author | JosJuice <josjuice@gmail.com> | 2022-08-01 11:53:30 +0200 |
|---|---|---|
| committer | JosJuice <josjuice@gmail.com> | 2022-08-04 22:00:59 +0200 |
| commit | 40a4eb3893ce3cae8a3edcc6356812fdcb98c1b9 (patch) | |
| tree | fd53444014d1d36953d5bfaf29c985a4b630c689 /Source/Core/DiscIO/DiscScrubber.cpp | |
| parent | a87dffe52d8bfaa05d07770a9113cf9406ea6db0 (diff) | |
DiscIO: Adjust GetDataSizeType logic for NFS
Diffstat (limited to 'Source/Core/DiscIO/DiscScrubber.cpp')
| -rw-r--r-- | Source/Core/DiscIO/DiscScrubber.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/Core/DiscIO/DiscScrubber.cpp b/Source/Core/DiscIO/DiscScrubber.cpp index 690af80045..22aa06571e 100644 --- a/Source/Core/DiscIO/DiscScrubber.cpp +++ b/Source/Core/DiscIO/DiscScrubber.cpp @@ -47,7 +47,11 @@ bool DiscScrubber::SetupScrub(const Volume* disc) bool DiscScrubber::CanBlockBeScrubbed(u64 offset) const { - return m_is_scrubbing && m_free_table[offset / CLUSTER_SIZE]; + if (!m_is_scrubbing) + return false; + + const u64 cluster_index = offset / CLUSTER_SIZE; + return cluster_index >= m_free_table.size() || m_free_table[cluster_index]; } void DiscScrubber::MarkAsUsed(u64 offset, u64 size) |
