about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/client/components/scoreboard.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/game/client/components/scoreboard.cpp b/src/game/client/components/scoreboard.cpp
index b7e8aa9a..80330e9c 100644
--- a/src/game/client/components/scoreboard.cpp
+++ b/src/game/client/components/scoreboard.cpp
@@ -166,13 +166,14 @@ void CScoreboard::RenderScoreboard(float x, float y, float w, int Team, const ch
 			if(pInfo->m_Team == Team)
 			{
 				paPlayers[NumPlayers] = pInfo;
-				NumPlayers++;
+				if(++NumPlayers == MAX_CLIENTS)
+					break;
 			}
 		}
 	}
 
 	// sort players
-	for(int k = 0; k < NumPlayers; k++) // ffs, bubblesort
+	for(int k = 0; k < NumPlayers-1; k++) // ffs, bubblesort
 	{
 		for(int i = 0; i < NumPlayers-k-1; i++)
 		{