diff --git a/Subsurface/Source/Networking/GameServer.cs b/Subsurface/Source/Networking/GameServer.cs index 3c8e819b5..6f9a44e05 100644 --- a/Subsurface/Source/Networking/GameServer.cs +++ b/Subsurface/Source/Networking/GameServer.cs @@ -55,8 +55,12 @@ namespace Barotrauma.Networking name = name.Replace(":", ""); name = name.Replace(";", ""); - this.name = name; - this.password = Encoding.UTF8.GetString(NetUtility.ComputeSHAHash(Encoding.UTF8.GetBytes(password))); + this.name = name; + this.password = ""; + if (password.Length>0) + { + this.password = Encoding.UTF8.GetString(NetUtility.ComputeSHAHash(Encoding.UTF8.GetBytes(password))); + } config = new NetPeerConfiguration("barotrauma");