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:
Jonathan Li 2019-09-21 22:29:23 +01:00
parent 33f4f04594
commit 0967f9bcfc
1 changed files with 2 additions and 4 deletions

View File

@ -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;