mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-11-17 03:24:19 +01: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:
1 parent
33f4f04594
commit
0967f9bcfc
1 file changed
+2
-4
@@ -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