From ba4b6f6708da0a770c42d5a50c6e89b291114e98 Mon Sep 17 00:00:00 2001 From: Mogzol Date: Mon, 7 Mar 2016 23:13:53 -0800 Subject: [PATCH] Fix comments in CodePatches.txt not counting as blank lines --- BrawlBuilder/BrawlBuilder.WorkerCode.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/BrawlBuilder/BrawlBuilder.WorkerCode.cs b/BrawlBuilder/BrawlBuilder.WorkerCode.cs index be6b48e..88778ba 100644 --- a/BrawlBuilder/BrawlBuilder.WorkerCode.cs +++ b/BrawlBuilder/BrawlBuilder.WorkerCode.cs @@ -170,10 +170,7 @@ namespace BrawlBuilder foreach (string s in File.ReadLines(@".\Resources\CodePatches.txt")) { - string line = s.Trim(); - - if (line.StartsWith("#")) - continue; // ignore comments + string line = s.Trim().Substring(0, s.IndexOf('#') < 0 ? s.Length : s.IndexOf('#')); // Trim whitespace, ignore comments if (actions.Contains(line)) {