Fixed a tiny mistake present in all mohaa versions, with a possible overflow in client index in PF_centerprintf and PF_locationprintf

This commit is contained in:
smallmodel 2023-08-19 13:36:12 +02:00
parent 4e38b803fb
commit ff2e64a742
No known key found for this signature in database
GPG key ID: A96F163ED4891440

View file

@ -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;
}
@ -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;
}