mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 20:41:46 +00:00
Fix buffer overwrite & increment
This commit is contained in:
parent
3246ca6b33
commit
a5f23091cc
2 changed files with 13 additions and 4 deletions
|
|
@ -3389,8 +3389,6 @@ static boolean SV_AddWaitingPlayers(void)
|
||||||
{
|
{
|
||||||
INT32 node, n, newplayer = false;
|
INT32 node, n, newplayer = false;
|
||||||
UINT8 newplayernum = 0;
|
UINT8 newplayernum = 0;
|
||||||
static UINT8 buf[3];
|
|
||||||
static UINT8 *buf_p = buf;
|
|
||||||
|
|
||||||
// What is the reason for this? Why can't newplayernum always be 0?
|
// What is the reason for this? Why can't newplayernum always be 0?
|
||||||
// Sal: Because the dedicated player is stupidly forced into players[0].....
|
// Sal: Because the dedicated player is stupidly forced into players[0].....
|
||||||
|
|
@ -3402,6 +3400,9 @@ static boolean SV_AddWaitingPlayers(void)
|
||||||
// splitscreen can allow 2+ players in one node
|
// splitscreen can allow 2+ players in one node
|
||||||
for (; nodewaiting[node] > 0; nodewaiting[node]--)
|
for (; nodewaiting[node] > 0; nodewaiting[node]--)
|
||||||
{
|
{
|
||||||
|
UINT8 buf[3];
|
||||||
|
UINT8 *buf_p = buf;
|
||||||
|
|
||||||
newplayer = true;
|
newplayer = true;
|
||||||
|
|
||||||
// search for a free playernum
|
// search for a free playernum
|
||||||
|
|
|
||||||
|
|
@ -718,8 +718,16 @@ void Y_Ticker(void)
|
||||||
|
|
||||||
r++;
|
r++;
|
||||||
data.match.jitter[data.match.num[q]] = 1;
|
data.match.jitter[data.match.num[q]] = 1;
|
||||||
if (--data.match.increase[data.match.num[q]])
|
if (data.match.increase[data.match.num[q]] > 0)
|
||||||
kaching = false;
|
{
|
||||||
|
if (--data.match.increase[data.match.num[q]])
|
||||||
|
kaching = false;
|
||||||
|
}
|
||||||
|
else if (data.match.increase[data.match.num[q]] < 0)
|
||||||
|
{
|
||||||
|
if (++data.match.increase[data.match.num[q]])
|
||||||
|
kaching = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (r)
|
if (r)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue