Fix scrubbing unencrypted Wii disc images (for real this time)
Unlike what my past self apparently thought, % is in fact not the "round down" operator. https://bugs.dolphin-emu.org/issues/11906
This commit is contained in:
parent
15fc71cfcf
commit
711b36075c
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue