Don't crash if server doesn't send MOTD packet (Thanks ksft)

This commit is contained in:
UnknownShadow200 2017-12-21 09:05:30 +11:00
parent fe0facc741
commit f73f7fe86e

View File

@ -24,6 +24,7 @@ namespace ClassicalSharp.Network.Protocols {
}
internal void CheckMotd() {
if (net.ServerMotd == null) return;
int index = net.ServerMotd.IndexOf("cfg=");
if (game.PureClassic || index == -1) return;