engine: client: fix invalid playerinfo being accessed by renderer

This commit is contained in:
Alibek Omarov
2022-08-13 01:29:45 +03:00
parent 1d558b33d6
commit 314672d82c
3 changed files with 1 additions and 17 deletions
+1 -1
View File
@@ -151,7 +151,7 @@ static player_info_t *pfnPlayerInfo( int index )
if( index == -1 ) // special index for menu
return &gameui.playerinfo;
if( index < 0 || index > cl.maxclients )
if( index < 0 || index >= cl.maxclients )
return NULL;
return &cl.players[index];