summaryrefslogtreecommitdiff
path: root/Source/Core/DiscIO
diff options
context:
space:
mode:
authorTillmann Karras <tilkax@gmail.com>2022-10-29 21:13:16 +0100
committerTillmann Karras <tilkax@gmail.com>2022-10-29 21:32:57 +0100
commitcacdd18ca04c9c707ecacf5049f3db5ce30a1235 (patch)
tree3c9b86090f9c7ad508fa8517600071f35185191d /Source/Core/DiscIO
parent6dcf8a6fc98a1aa4451d6ed40cd057bf9e6430be (diff)
VolumeVerifier: fix bogus "serial/version missing" error
When searching for a disc where the revision doesn't match any disc in the datfile, the loop would never get to the part where serials_exist is set to true, leading to a bogus error message.
Diffstat (limited to 'Source/Core/DiscIO')
-rw-r--r--Source/Core/DiscIO/VolumeVerifier.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/Core/DiscIO/VolumeVerifier.cpp b/Source/Core/DiscIO/VolumeVerifier.cpp
index a2810b5919..c6392d446b 100644
--- a/Source/Core/DiscIO/VolumeVerifier.cpp
+++ b/Source/Core/DiscIO/VolumeVerifier.cpp
@@ -238,14 +238,15 @@ std::vector<RedumpVerifier::PotentialMatch> RedumpVerifier::ScanDatfile(const st
const int version = version_string.empty() ? 0 : std::stoi(version_string);
+ const std::string serials = game.child("serial").text().as_string();
+ if (!serials.empty())
+ serials_exist = true;
+
// The revisions for Korean GameCube games whose four-char game IDs end in E are numbered from
// 0x30 in ring codes and in disc headers, but Redump switched to numbering them from 0 in 2019.
if (version % 0x30 != m_revision % 0x30)
continue;
- const std::string serials = game.child("serial").text().as_string();
- if (!serials.empty())
- serials_exist = true;
if (serials.empty() || StringBeginsWith(serials, "DS"))
{
// GC Datel discs have no serials in Redump, Wii Datel discs have serials like "DS000101"