[DatFile] "Contains" causes issues in RC parsing

This commit is contained in:
Matt Nadareski
2016-10-07 14:08:17 -07:00
parent e94cff8994
commit b1f55cba15

View File

@@ -3361,22 +3361,22 @@ namespace SabreTools.Helper
string line = sr.ReadLine(); string line = sr.ReadLine();
// If the line is the start of the credits section // If the line is the start of the credits section
if (line.ToLowerInvariant().Contains("[credits]")) if (line.ToLowerInvariant().StartsWith("[credits]"))
{ {
blocktype = "credits"; blocktype = "credits";
} }
// If the line is the start of the dat section // If the line is the start of the dat section
else if (line.ToLowerInvariant().Contains("[dat]")) else if (line.ToLowerInvariant().StartsWith("[dat]"))
{ {
blocktype = "dat"; blocktype = "dat";
} }
// If the line is the start of the emulator section // If the line is the start of the emulator section
else if (line.ToLowerInvariant().Contains("[emulator]")) else if (line.ToLowerInvariant().StartsWith("[emulator]"))
{ {
blocktype = "emulator"; blocktype = "emulator";
} }
// If the line is the start of the game section // If the line is the start of the game section
else if (line.ToLowerInvariant().Contains("[games]")) else if (line.ToLowerInvariant().StartsWith("[games]"))
{ {
blocktype = "games"; blocktype = "games";
} }