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

View file

@ -118,10 +118,13 @@ static const rapidjson::Value* FindDatabaseEntry(const std::string_view& code, r
continue; 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; return &current;
} }
} }
}
return nullptr; return nullptr;
} }