mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-28 19:58:53 +00:00
When reading an ini file, if there is an error, check if it is simply because the eof was reached.
This commit is contained in:
parent
10efd5b8c0
commit
80ab567a5b
1 changed files with 8 additions and 1 deletions
|
@ -347,9 +347,16 @@ bool IniFile::Load(const std::string& filename, bool keep_current_data)
|
||||||
char templine[MAX_BYTES];
|
char templine[MAX_BYTES];
|
||||||
std::string line;
|
std::string line;
|
||||||
if (in.getline(templine, MAX_BYTES))
|
if (in.getline(templine, MAX_BYTES))
|
||||||
|
{
|
||||||
line = templine;
|
line = templine;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (in.eof())
|
||||||
|
return true;
|
||||||
else
|
else
|
||||||
return false;
|
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…
Add table
Add a link
Reference in a new issue