[Crash] Fix player events reload when out of bounds (#4321)

This commit is contained in:
Chris Miles 2024-05-24 20:53:47 -05:00 committed by GitHub
parent 3a51f04291
commit 2586527157
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -642,6 +642,10 @@ void PlayerEventLogs::ProcessRetentionTruncation()
void PlayerEventLogs::ReloadSettings() void PlayerEventLogs::ReloadSettings()
{ {
for (auto &e: PlayerEventLogSettingsRepository::All(*m_database)) { for (auto &e: PlayerEventLogSettingsRepository::All(*m_database)) {
if (e.id >= PlayerEvent::MAX || e.id < 0) {
continue;
}
m_settings[e.id] = e; m_settings[e.id] = e;
} }
} }