Skip to content

Commit

Permalink
Merge pull request #8496 from JosJuice/volumewii-check-decrypted-order
Browse files Browse the repository at this point in the history
VolumeWii: Check SupportsReadWiiDecrypted before m_encrypted
  • Loading branch information
Helios747 committed Nov 27, 2019
2 parents f20c1c2 + 23fc5f9 commit 44f85bb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Source/Core/DiscIO/VolumeWii.cpp
Expand Up @@ -162,6 +162,9 @@ bool VolumeWii::Read(u64 offset, u64 length, u8* buffer, const Partition& partit
if (partition == PARTITION_NONE)
return m_reader->Read(offset, length, buffer);

if (m_reader->SupportsReadWiiDecrypted())
return m_reader->ReadWiiDecrypted(offset, length, buffer, partition.offset);

auto it = m_partitions.find(partition);
if (it == m_partitions.end())
return false;
Expand All @@ -173,9 +176,6 @@ bool VolumeWii::Read(u64 offset, u64 length, u8* buffer, const Partition& partit
buffer);
}

if (m_reader->SupportsReadWiiDecrypted())
return m_reader->ReadWiiDecrypted(offset, length, buffer, partition.offset);

mbedtls_aes_context* aes_context = partition_details.key->get();
if (!aes_context)
return false;
Expand Down

0 comments on commit 44f85bb

Please sign in to comment.