summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorAdmiral H. Curtiss <pikachu025@gmail.com>2024-04-06 20:40:13 +0200
committerGitHub <noreply@github.com>2024-04-06 20:40:13 +0200
commit116da3ab956ed02043cd944a76ea05f828965fef (patch)
tree7abcdee4b8d0a8747a189befaf3ef793e9a83c81 /Source/Core
parentd3073353a715a43061b6170c56ccc21745d37015 (diff)
parent9c705f10114f07359be1b862d9701b961fbd844f (diff)
Merge pull request #12689 from Tilka/movie
Movie: simplify silly loop
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/Movie.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/Source/Core/Core/Movie.cpp b/Source/Core/Core/Movie.cpp
index e759358e04..b19ebd6f73 100644
--- a/Source/Core/Core/Movie.cpp
+++ b/Source/Core/Core/Movie.cpp
@@ -1519,14 +1519,11 @@ void MovieManager::CheckMD5()
if (m_current_file_name.empty())
return;
- for (int i = 0, n = 0; i < 16; ++i)
- {
- if (m_temp_header.md5[i] != 0)
- continue;
- n++;
- if (n == 16)
- return;
- }
+ // The MD5 hash was introduced in 3.0-846-gca650d4435.
+ // Before that, these header bytes were set to zero.
+ if (m_temp_header.md5 == std::array<u8, 16>{})
+ return;
+
Core::DisplayMessage("Verifying checksum...", 2000);
std::array<u8, 16> game_md5;