From ae14fd2f8559a9935471ed64e39e507ac80bc027 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Tue, 4 Dec 2018 21:09:28 +0000 Subject: [PATCH] Fix motd being broken for admins It turns out the game was sending the full size of the motd buffer (254) rather than just the size of the string made, therefore sending a load of garbage and making the game apparently execute unknown or illegal net commands --- src/d_netcmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/d_netcmd.c b/src/d_netcmd.c index c8e33a57..290183e2 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -2965,7 +2965,7 @@ static void Command_MotD_f(void) } if ((netgame || multiplayer) && client) - SendNetXCmd(XD_SETMOTD, mymotd, sizeof(motd)); + SendNetXCmd(XD_SETMOTD, mymotd, i); // send the actual size of the motd string, not the full buffer's size else { strcpy(motd, mymotd);