From ef49a946c936bd92006af82cf6d8d3333b7fc8df Mon Sep 17 00:00:00 2001 From: juanjp600 Date: Sat, 3 Sep 2016 21:38:02 -0300 Subject: [PATCH] Fixed whitelist crashing server init when not enabled in file --- Subsurface/Source/Networking/WhiteList.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Subsurface/Source/Networking/WhiteList.cs b/Subsurface/Source/Networking/WhiteList.cs index 148bfc769..aa6459992 100644 --- a/Subsurface/Source/Networking/WhiteList.cs +++ b/Subsurface/Source/Networking/WhiteList.cs @@ -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; }