mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-10-01 08:47:01 +02:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user