From 92d1c33426856dbcfe613f948892102310aecfa7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Mon, 15 Jan 2024 12:21:48 +0100 Subject: [PATCH] Another minor GameDB fix --- Core/Util/GameDB.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Core/Util/GameDB.cpp b/Core/Util/GameDB.cpp index ad1879f8bb..c29066b95e 100644 --- a/Core/Util/GameDB.cpp +++ b/Core/Util/GameDB.cpp @@ -40,13 +40,16 @@ static void SplitSV(std::string_view strv, char delim, bool removeWhiteSpace, st const auto second = strv.find(delim, first); if (first != second) { std::string_view line = strv.substr(first, second - first); + _dbg_assert_(!line.empty()); if (line.back() == '\r') { - line = strv.substr(first, second - first - 1); + line.remove_suffix(1); } if (removeWhiteSpace) { line = StripSpaces(line); } - output->emplace_back(line); + if (!line.empty()) { + output->emplace_back(line); + } } if (second == std::string_view::npos) break;