diff options
| author | Léo Lam <leo@leolam.fr> | 2020-10-20 14:29:46 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-20 14:29:46 +0200 |
| commit | b2709b81a0476dfea3afe82ae3f78fef93534633 (patch) | |
| tree | 285579be6478049a58cfc2ba762a62921cdb40b2 /Source/Core/DiscIO/WiiEncryptionCache.cpp | |
| parent | 96cb27842ab92cec305e739ae726bf8ebbd74233 (diff) | |
| parent | 5b6f604d90fe15b9453171a1ec8ce2683437a6ee (diff) | |
Merge pull request #9166 from JosJuice/encryption-cache-move
DiscIO: Make WiiEncryptionCache moveable
Diffstat (limited to 'Source/Core/DiscIO/WiiEncryptionCache.cpp')
| -rw-r--r-- | Source/Core/DiscIO/WiiEncryptionCache.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/Core/DiscIO/WiiEncryptionCache.cpp b/Source/Core/DiscIO/WiiEncryptionCache.cpp index 52d978761e..68a307c956 100644 --- a/Source/Core/DiscIO/WiiEncryptionCache.cpp +++ b/Source/Core/DiscIO/WiiEncryptionCache.cpp @@ -29,7 +29,10 @@ WiiEncryptionCache::EncryptGroup(u64 offset, u64 partition_data_offset, { // Only allocate memory if this function actually ends up getting called if (!m_cache) + { m_cache = std::make_unique<std::array<u8, VolumeWii::GROUP_TOTAL_SIZE>>(); + m_cached_offset = std::numeric_limits<u64>::max(); + } ASSERT(offset % VolumeWii::GROUP_TOTAL_SIZE == 0); const u64 group_offset_in_partition = |
