[Player Events] Fix rare out of bound issue when loading event types (#2946)

This commit is contained in:
Chris Miles 2023-02-17 06:06:53 -06:00 committed by GitHub
parent 3949a31246
commit da20a6ab67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,6 +30,9 @@ void PlayerEventLogs::Init()
std::vector<int> db{};
db.reserve(s.size());
for (auto &e: s) {
if (e.id >= PlayerEvent::MAX) {
continue;
}
m_settings[e.id] = e;
db.emplace_back(e.id);
}