GameDB: Fix empty could not find serial and searching for serial logs.

Fixes the logs from pasting when the size of the serial is 0 which is invalid.

Update GameDatabase.cpp
This commit is contained in:
lightningterror 2022-12-22 07:37:29 +01:00
parent 059ce3b7f0
commit a0b6290a4d
1 changed files with 4 additions and 0 deletions

View File

@ -753,6 +753,10 @@ const GameDatabaseSchema::GameEntry* GameDatabase::findGame(const std::string_vi
GameDatabase::ensureLoaded();
std::string serialLower = StringUtil::toLower(serial);
if (serialLower.empty())
return nullptr;
Console.WriteLn(fmt::format("[GameDB] Searching for '{}' in GameDB", serialLower));
const auto gameEntry = s_game_db.find(serialLower);
if (gameEntry != s_game_db.end())