mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-10 23:02:01 +00:00
Fix buffer overflow, reported by Mads Lind
This commit is contained in:
parent
0e6427f3ff
commit
a2715bc283
1 changed files with 3 additions and 2 deletions
|
@ -765,9 +765,10 @@ void CalculateRanks( void ) {
|
||||||
level.numNonSpectatorClients = 0;
|
level.numNonSpectatorClients = 0;
|
||||||
level.numPlayingClients = 0;
|
level.numPlayingClients = 0;
|
||||||
level.numVotingClients = 0; // don't count bots
|
level.numVotingClients = 0; // don't count bots
|
||||||
for ( i = 0; i < TEAM_NUM_TEAMS; i++ ) {
|
|
||||||
|
for (i = 0; i < ARRAY_LEN(level.numteamVotingClients); i++)
|
||||||
level.numteamVotingClients[i] = 0;
|
level.numteamVotingClients[i] = 0;
|
||||||
}
|
|
||||||
for ( i = 0 ; i < level.maxclients ; i++ ) {
|
for ( i = 0 ; i < level.maxclients ; i++ ) {
|
||||||
if ( level.clients[i].pers.connected != CON_DISCONNECTED ) {
|
if ( level.clients[i].pers.connected != CON_DISCONNECTED ) {
|
||||||
level.sortedClients[level.numConnectedClients] = i;
|
level.sortedClients[level.numConnectedClients] = i;
|
||||||
|
|
Loading…
Reference in a new issue