Merge pull request #8516 from JosJuice/scrub-unencrypted-again

Fix scrubbing unencrypted Wii disc images (for real this time)
This commit is contained in:
Anthony 2019-12-08 12:25:16 -08:00 committed by GitHub
commit a21fb96638
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,6 +13,7 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include "Common/Align.h"
#include "Common/CommonTypes.h" #include "Common/CommonTypes.h"
#include "Common/File.h" #include "Common/File.h"
#include "Common/Logging/Log.h" #include "Common/Logging/Log.h"
@ -124,7 +125,7 @@ u64 DiscScrubber::ToClusterOffset(u64 offset) const
if (m_disc->IsEncryptedAndHashed()) if (m_disc->IsEncryptedAndHashed())
return offset / 0x7c00 * CLUSTER_SIZE; return offset / 0x7c00 * CLUSTER_SIZE;
else else
return offset % CLUSTER_SIZE; return Common::AlignDown(offset, CLUSTER_SIZE);
} }
// Helper functions for reading the BE volume // Helper functions for reading the BE volume