Merge pull request #431 from RachelBryk/fix-ini-error

When reading an ini file, if there is an error, check if it is simply be...
This commit is contained in:
Pierre Bourdon 2014-05-29 01:58:20 +02:00
commit e0edf31608
1 changed files with 8 additions and 1 deletions

View File

@ -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())
return true;
else
return false;
}
#ifndef _WIN32
// Check for CRLF eol and convert it to LF