diff --git a/Source/Core/DiscIO/VolumeVerifier.cpp b/Source/Core/DiscIO/VolumeVerifier.cpp index aed3c87a44..de1d434dca 100644 --- a/Source/Core/DiscIO/VolumeVerifier.cpp +++ b/Source/Core/DiscIO/VolumeVerifier.cpp @@ -265,7 +265,7 @@ std::vector RedumpVerifier::ScanDatfile(const st const size_t game_id_start = first_dash == std::string::npos ? std::string::npos : first_dash + 1; - if (serial.size() < game_id_start + 4) + if (game_id_start == std::string::npos || serial.size() < game_id_start + 4) { ERROR_LOG(DISCIO, "Invalid serial in redump datfile: %s", serial_str.c_str()); continue;