Skip to content

Commit

Permalink
Fixed a tiny mistake present in all mohaa versions, with a possible o…
Browse files Browse the repository at this point in the history
…verflow in client index in PF_centerprintf and PF_locationprintf
  • Loading branch information
smallmodel committed Aug 19, 2023
1 parent 4e38b80 commit ff2e64a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/server/sv_game.c
Original file line number Diff line number Diff line change
Expand Up @@ -1298,7 +1298,7 @@ void PF_centerprintf( gentity_t *ent, const char *fmt, ... )
va_list va;
char msg[ 2048 ];

if( ent->s.number > svs.iNumClients )
if( ent->s.number >= svs.iNumClients )
{
return;
}
Expand All @@ -1324,7 +1324,7 @@ void PF_locationprintf( gentity_t *ent, int x, int y, const char *fmt, ... )
va_list va;
char msg[ 2048 ];

if( ent->s.number > svs.iNumClients )
if( ent->s.number >= svs.iNumClients )
{
return;
}
Expand Down

0 comments on commit ff2e64a

Please sign in to comment.