mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-27 21:01:04 +00:00
Check target < MAXPLAYERS before PM
This commit is contained in:
parent
a9fb17dab1
commit
6ebc41a554
1 changed files with 2 additions and 2 deletions
|
@ -490,7 +490,7 @@ static void DoSayCommand(SINT8 target, size_t usedargs, UINT8 flags)
|
||||||
//CONS_Printf("%d\n", target);
|
//CONS_Printf("%d\n", target);
|
||||||
|
|
||||||
// check for target player, if it doesn't exist then we can't send the message!
|
// check for target player, if it doesn't exist then we can't send the message!
|
||||||
if (playeringame[target]) // player exists
|
if (target < MAXPLAYERS && playeringame[target]) // player exists
|
||||||
target++; // even though playernums are from 0 to 31, target is 1 to 32, so up that by 1 to have it work!
|
target++; // even though playernums are from 0 to 31, target is 1 to 32, so up that by 1 to have it work!
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1014,7 +1014,7 @@ static void HU_queueChatChar(char c)
|
||||||
//CONS_Printf("%d\n", target);
|
//CONS_Printf("%d\n", target);
|
||||||
|
|
||||||
// check for target player, if it doesn't exist then we can't send the message!
|
// check for target player, if it doesn't exist then we can't send the message!
|
||||||
if (playeringame[target]) // player exists
|
if (target < MAXPLAYERS && playeringame[target]) // player exists
|
||||||
target++; // even though playernums are from 0 to 31, target is 1 to 32, so up that by 1 to have it work!
|
target++; // even though playernums are from 0 to 31, target is 1 to 32, so up that by 1 to have it work!
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue