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
Branches
Tags
No related merge requests found
......@@ -2650,6 +2650,8 @@ static void Command_Kick(void)
if (pn == -1 || pn == 0)
return;
if (server)
{
// 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
// take effect after they have finished downloading
......@@ -2658,6 +2660,7 @@ static void Command_Kick(void)
Net_ConnectionTimeout(playernode[pn]);
return;
}
}
WRITESINT8(p, pn);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment