mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-25 15:19:42 -06:00
TitleDatabase: Check game ID length before reading characters
This commit is contained in:
@ -67,7 +67,7 @@ static bool LoadMap(const std::string& file_path, Map& map,
|
|||||||
if (equals_index != std::string::npos)
|
if (equals_index != std::string::npos)
|
||||||
{
|
{
|
||||||
const std::string game_id = StripSpaces(line.substr(0, equals_index));
|
const std::string game_id = StripSpaces(line.substr(0, equals_index));
|
||||||
if (predicate(game_id))
|
if (game_id.length() >= 4 && predicate(game_id))
|
||||||
map[game_id] = StripSpaces(line.substr(equals_index + 1));
|
map[game_id] = StripSpaces(line.substr(equals_index + 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user