Check for errors when reading lines from ini files.
Fixes issue 7283.
This commit is contained in:
parent
b58753bd69
commit
0782d106db
|
@ -345,8 +345,11 @@ bool IniFile::Load(const std::string& filename, bool keep_current_data)
|
||||||
while (!in.eof())
|
while (!in.eof())
|
||||||
{
|
{
|
||||||
char templine[MAX_BYTES];
|
char templine[MAX_BYTES];
|
||||||
in.getline(templine, MAX_BYTES);
|
std::string line;
|
||||||
std::string line = templine;
|
if (in.getline(templine, MAX_BYTES))
|
||||||
|
line = templine;
|
||||||
|
else
|
||||||
|
return false;
|
||||||
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
// Check for CRLF eol and convert it to LF
|
// Check for CRLF eol and convert it to LF
|
||||||
|
|
Loading…
Reference in New Issue