fix assert when parsing a line that contains only whitespace

This commit is contained in:
Chris Danford
2005-09-24 20:26:30 +00:00
parent 682f9aa379
commit 45cc63b84f
+5 -4
View File
@@ -51,12 +51,13 @@ void IniFile::ReadBuf( const CString &buf )
line.Delete(0, 3); line.Delete(0, 3);
} }
if (line == "")
continue;
StripCrnl(line); StripCrnl(line);
if ((line.GetLength() >= 2 && line[0] == '/' && line[1] == '/') || line[0] == '#') if( line.IsEmpty() )
continue;
if ((line.GetLength() >= 2 && line[0] == '/' && line[1] == '/') )
continue; /* comment */
if( line[0] == '#')
continue; /* comment */ continue; /* comment */
if (line[0] == '[' && line[line.GetLength()-1] == ']') //if a section heading if (line[0] == '[' && line[line.GetLength()-1] == ']') //if a section heading