Fixed whitelist crashing server init when not enabled in file

This commit is contained in:
juanjp600
2016-09-03 21:38:02 -03:00
parent 73bdd77c08
commit ef49a946c9

View File

@@ -65,7 +65,9 @@ namespace Barotrauma.Networking
if (line[0] == '#')
{
string lineval = line.Substring(1, line.Length - 1);
if (lineval.ToLower()=="true" || Convert.ToInt32(lineval)!=0)
int intVal = 0;
Int32.TryParse(lineval, out intVal);
if (lineval.ToLower() == "true" || intVal != 0)
{
enabled = true;
}