Skip to content

Commit

Permalink
Merge pull request #431 from RachelBryk/fix-ini-error
Browse files Browse the repository at this point in the history
When reading an ini file, if there is an error, check if it is simply be...
  • Loading branch information
delroth committed May 28, 2014
2 parents 10efd5b + 80ab567 commit e0edf31
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Source/Core/Common/IniFile.cpp
Expand Up @@ -347,9 +347,16 @@ bool IniFile::Load(const std::string& filename, bool keep_current_data)
char templine[MAX_BYTES];
std::string line;
if (in.getline(templine, MAX_BYTES))
{
line = templine;
}
else
return false;
{
if (in.eof())

This comment has been minimized.

Copy link
@galop1n

galop1n May 29, 2014

Contributor

why not a simple "return in.eof();" ?

return true;
else
return false;
}

#ifndef _WIN32
// Check for CRLF eol and convert it to LF
Expand Down

0 comments on commit e0edf31

Please sign in to comment.