GameDatabase: Fix incorrect entries returned from short serials

This commit is contained in:
Connor McLaughlin 2021-04-22 12:52:18 +10:00
parent a11883e2b4
commit 558978b7f2
1 changed files with 4 additions and 1 deletions

View File

@ -118,8 +118,11 @@ static const rapidjson::Value* FindDatabaseEntry(const std::string_view& code, r
continue;
}
if (StringUtil::Strncasecmp(current_code.GetString(), code.data(), code.length()) == 0)
if (current_code.GetStringLength() == code.length() &&
StringUtil::Strncasecmp(current_code.GetString(), code.data(), code.length()) == 0)
{
return &current;
}
}
}