From 9cc719db02a1f52aa8df0270649c4a6dac478f41 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Fri, 9 Aug 2019 18:02:27 +0200 Subject: [PATCH] Fix TitleDatabase a2a1e04 regression. --- Source/Core/Core/TitleDatabase.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/Core/Core/TitleDatabase.cpp b/Source/Core/Core/TitleDatabase.cpp index 84f8f0b9f2..86f9a9feae 100644 --- a/Source/Core/Core/TitleDatabase.cpp +++ b/Source/Core/Core/TitleDatabase.cpp @@ -41,9 +41,10 @@ static Map LoadMap(const std::string& file_path) const size_t equals_index = line.find('='); if (equals_index != std::string::npos) { - const std::string_view game_id = StripSpaces(line.substr(0, equals_index)); + const std::string_view line_view(line); + const std::string_view game_id = StripSpaces(line_view.substr(0, equals_index)); if (game_id.length() >= 4) - map.emplace(game_id, StripSpaces(line.substr(equals_index + 1))); + map.emplace(game_id, StripSpaces(line_view.substr(equals_index + 1))); } } return map;