Skip to content

Commit

Permalink
DiscIO/DiscScrubber: Check offset passed to CanBlockBeScrubbed().
Browse files Browse the repository at this point in the history
  • Loading branch information
AdmiralCurtiss committed Jul 12, 2022
1 parent a321274 commit fdac762
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/Core/DiscIO/DiscScrubber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ bool DiscScrubber::SetupScrub(const Volume* disc)

bool DiscScrubber::CanBlockBeScrubbed(u64 offset) const
{
return m_is_scrubbing && m_free_table[offset / CLUSTER_SIZE];
return m_is_scrubbing && offset < m_file_size && m_free_table[offset / CLUSTER_SIZE];
}

void DiscScrubber::MarkAsUsed(u64 offset, u64 size)
Expand Down

0 comments on commit fdac762

Please sign in to comment.