mirror of
https://github.com/Retropex/dolphin.git
synced 2025-08-05 22:44:49 +02:00
RedumpVerifier: Don't crash on missing hyphen in serial
This commit is contained in:
parent
a52b8759ff
commit
49977446dd
@ -265,7 +265,7 @@ std::vector<RedumpVerifier::PotentialMatch> RedumpVerifier::ScanDatfile(const st
|
|||||||
const size_t game_id_start =
|
const size_t game_id_start =
|
||||||
first_dash == std::string::npos ? std::string::npos : first_dash + 1;
|
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());
|
ERROR_LOG(DISCIO, "Invalid serial in redump datfile: %s", serial_str.c_str());
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user