Ignore newlines in INI parser
This commit is contained in:
@@ -40,7 +40,17 @@ BlConfigParseIniFile(IN PWCHAR FileContents,
|
||||
while(Argument != NULL)
|
||||
{
|
||||
/* Check every line */
|
||||
if(RtlWideStringCompare(Argument, L"[", 1) == 0)
|
||||
if(RtlWideStringCompare(Argument, L"\r\n", 2) == 0)
|
||||
{
|
||||
/* We can safely ignore a newline */
|
||||
Argument += 2;
|
||||
}
|
||||
else if(RtlWideStringCompare(Argument, L"#", 1) == 0)
|
||||
{
|
||||
/* We can safely ignore a comment */
|
||||
Argument += 1;
|
||||
}
|
||||
else if(RtlWideStringCompare(Argument, L"[", 1) == 0)
|
||||
{
|
||||
/* Skip to the section name */
|
||||
Argument += 1;
|
||||
@@ -95,11 +105,6 @@ BlConfigParseIniFile(IN PWCHAR FileContents,
|
||||
/* Set a tune */
|
||||
BlConsolePrint(L"Setting TUNE value to %S\n", Argument);
|
||||
}
|
||||
else if(RtlWideStringCompare(Argument, L"#", 1) == 0)
|
||||
{
|
||||
/* We can safely ignore a comment */
|
||||
Argument += 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Configuration file might be corrupt */
|
||||
|
Reference in New Issue
Block a user