mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[DatFile] "Contains" causes issues in RC parsing
This commit is contained in:
@@ -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";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user