Skip to content
Permalink
Browse files

Add bounds check for userid reset on disconnect (#1108)

  • Loading branch information
Headline committed Oct 31, 2019
1 parent c0686dc commit 00b7ac5a39f9b6ffddfabc18e310ca1184fedbc1
Showing with 4 additions and 1 deletion.
  1. +4 −1 core/PlayerManager.cpp
@@ -1474,7 +1474,10 @@ void PlayerManager::InvalidatePlayer(CPlayer *pPlayer)
}
}

m_UserIdLookUp[engine->GetPlayerUserId(pPlayer->m_pEdict)] = 0;
auto userid = engine->GetPlayerUserId(pPlayer->m_pEdict);
if (userid != -1)
m_UserIdLookUp[userid] = 0;

pPlayer->Disconnect();
}

1 comment on commit 00b7ac5

@sigsegv-mvm

This comment has been minimized.

Copy link

sigsegv-mvm commented on 00b7ac5 Oct 31, 2019

For anyone looking through the commit logs, this unassuming-looking patch almost certainly fixes #748.

Please sign in to comment.
You can’t perform that action at this time.