DeHackEd: made reading comments in unexpected places more robust. Fixes #732

This commit is contained in:
biwa 2022-05-11 23:28:50 +02:00
parent a1df690ae4
commit 183af344e6

View file

@ -195,10 +195,11 @@ namespace CodeImp.DoomBuilder.Dehacked
linenumber++;
string line = datareader.ReadLine();
// Cut everything from the line after a #, unless it's a editor key (#$)
if (line != null)
return line.Trim();
else
return null;
return Regex.Replace(line, @"(#[^$].+)", "", RegexOptions.IgnoreCase).Trim();
return null;
}
/// <summary>