Skip to content
Snippets Groups Projects
Commit aee8dcdf authored by Monster Iestyn's avatar Monster Iestyn
Browse files

Fix 64-bit build-using admins not being able to kick players besides...

Fix 64-bit build-using admins not being able to kick players besides themselves, by not checking sendingsavegame[] code at all if not the server

it turns out playernode[pn] is typically 255 in the above situation, so sendingsavegame[playernode[pn]] goes out of bounds ...but goodness knows why 32-bit builds didn't suffer the same bug, seems to have been pure luck
parent ae14fd2f
No related branches found
No related tags found
No related merge requests found
...@@ -2650,6 +2650,8 @@ static void Command_Kick(void) ...@@ -2650,6 +2650,8 @@ static void Command_Kick(void)
if (pn == -1 || pn == 0) if (pn == -1 || pn == 0)
return; return;
if (server)
{
// Special case if we are trying to kick a player who is downloading the game state: // Special case if we are trying to kick a player who is downloading the game state:
// trigger a timeout instead of kicking them, because a kick would only // trigger a timeout instead of kicking them, because a kick would only
// take effect after they have finished downloading // take effect after they have finished downloading
...@@ -2658,6 +2660,7 @@ static void Command_Kick(void) ...@@ -2658,6 +2660,7 @@ static void Command_Kick(void)
Net_ConnectionTimeout(playernode[pn]); Net_ConnectionTimeout(playernode[pn]);
return; return;
} }
}
WRITESINT8(p, pn); WRITESINT8(p, pn);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment