diff options
Diffstat (limited to 'Source/Core/DiscIO/VolumeWii.cpp')
| -rw-r--r-- | Source/Core/DiscIO/VolumeWii.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/Source/Core/DiscIO/VolumeWii.cpp b/Source/Core/DiscIO/VolumeWii.cpp index 63e20ec1e6..cf5503458a 100644 --- a/Source/Core/DiscIO/VolumeWii.cpp +++ b/Source/Core/DiscIO/VolumeWii.cpp @@ -412,12 +412,9 @@ bool VolumeWii::CheckH3TableIntegrity(const Partition& partition) const return h3_table_sha1 == contents[0].sha1; } -bool VolumeWii::CheckBlockIntegrity(u64 block_index, const std::vector<u8>& encrypted_data, +bool VolumeWii::CheckBlockIntegrity(u64 block_index, const u8* encrypted_data, const Partition& partition) const { - if (encrypted_data.size() != BLOCK_TOTAL_SIZE) - return false; - auto it = m_partitions.find(partition); if (it == m_partitions.end()) return false; @@ -431,10 +428,10 @@ bool VolumeWii::CheckBlockIntegrity(u64 block_index, const std::vector<u8>& encr return false; HashBlock hashes; - DecryptBlockHashes(encrypted_data.data(), &hashes, aes_context); + DecryptBlockHashes(encrypted_data, &hashes, aes_context); u8 cluster_data[BLOCK_DATA_SIZE]; - DecryptBlockData(encrypted_data.data(), cluster_data, aes_context); + DecryptBlockData(encrypted_data, cluster_data, aes_context); for (u32 hash_index = 0; hash_index < 31; ++hash_index) { @@ -474,7 +471,7 @@ bool VolumeWii::CheckBlockIntegrity(u64 block_index, const Partition& partition) std::vector<u8> cluster(BLOCK_TOTAL_SIZE); if (!m_reader->Read(cluster_offset, cluster.size(), cluster.data())) return false; - return CheckBlockIntegrity(block_index, cluster, partition); + return CheckBlockIntegrity(block_index, cluster.data(), partition); } bool VolumeWii::HashGroup(const std::array<u8, BLOCK_DATA_SIZE> in[BLOCKS_PER_GROUP], |
