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
This commit is contained in:
Monster Iestyn 2018-12-04 21:09:28 +00:00
parent b4b82e681c
commit ae14fd2f85

View file

@ -2965,7 +2965,7 @@ static void Command_MotD_f(void)
} }
if ((netgame || multiplayer) && client) 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 else
{ {
strcpy(motd, mymotd); strcpy(motd, mymotd);