From f71fcd38bd445d8cb3777b42cfa3ca61d10f8cb1 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Sat, 3 Jun 2017 20:40:05 +0200 Subject: [PATCH] TitleDatabase: Check game ID length before reading characters --- Source/Core/Core/TitleDatabase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/Core/TitleDatabase.cpp b/Source/Core/Core/TitleDatabase.cpp index c138d3698b..9225d6705d 100644 --- a/Source/Core/Core/TitleDatabase.cpp +++ b/Source/Core/Core/TitleDatabase.cpp @@ -67,7 +67,7 @@ static bool LoadMap(const std::string& file_path, Map& map, if (equals_index != std::string::npos) { 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)); } }