mostly fixes openra startup time

git-svn-id: svn://svn.ijw.co.nz/svn/OpenRa@1928 993157c7-ee19-0410-b2c4-bb4e9862e678
This commit is contained in:
chrisf
2008-03-13 02:28:58 +00:00
parent 88adf25113
commit 25ece92b1f
6 changed files with 83 additions and 32 deletions

View File

@@ -22,7 +22,7 @@ namespace OpenRa.FileFormats
}
}
Regex sectionPattern = new Regex( @"\[([^]]*)\]" );
Regex sectionPattern = new Regex( @"^\[([^]]*)\]" );
Regex entryPattern = new Regex( @"([^=;]+)=([^;]*)" );
bool ProcessSection( string line )
@@ -40,6 +40,9 @@ namespace OpenRa.FileFormats
bool ProcessEntry( string line )
{
if (string.IsNullOrEmpty(line) || line.StartsWith(";"))
return false;
Match m = entryPattern.Match( line );
if( m == null || !m.Success )
return false;