Fix comments in CodePatches.txt not counting as blank lines

This commit is contained in:
Mogzol 2016-03-07 23:13:53 -08:00
parent 5fe4d69868
commit ba4b6f6708

View File

@ -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))
{