mirror of https://github.com/PCSX2/pcsx2.git
cdvdgigaherz: Prevent potential infinite loop on ini read
Fixes a condition where a file read error could cause an infinite loop.
This commit is contained in:
parent
33f4f04594
commit
0967f9bcfc
|
@ -54,10 +54,8 @@ void Settings::Load(const std::string &filename)
|
|||
if (!file.is_open())
|
||||
return;
|
||||
|
||||
while (!file.eof()) {
|
||||
std::string line;
|
||||
std::getline(file, line);
|
||||
|
||||
std::string line;
|
||||
while (std::getline(file, line)) {
|
||||
auto separator = line.find('=');
|
||||
if (separator == std::string::npos)
|
||||
continue;
|
||||
|
|
Loading…
Reference in New Issue