TitleDatabase: Check game ID length before reading characters

This commit is contained in:
JosJuice 2017-06-03 20:40:05 +02:00
parent 4493b1324b
commit f71fcd38bd
1 changed files with 1 additions and 1 deletions

View File

@ -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));
} }
} }