diff --git a/src/util.cpp b/src/util.cpp index 41ac1f1..f2d358b 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -1049,7 +1049,7 @@ std::vector> parse_config(const std::string& file_name) std::string s; - while (std::getline(f, s).good()) { + while (f.good() && std::getline(f, s)) { if (s.empty()) { continue; } diff --git a/tests/src/test_params.conf b/tests/src/test_params.conf index 6aea144..1c2d25d 100644 --- a/tests/src/test_params.conf +++ b/tests/src/test_params.conf @@ -14,4 +14,4 @@ param6 = value1 value2 value3 param8#comment param9 -abcdefghijklmnopqrstuvwxyz-ABCDEFGHIJKLMNOPQRSTUVWXYZ-0123456789=0123456789-ABCDEFGHIJKLMNOPQRSTUVWXYZ-abcdefghijklmnopqrstuvwxyz=:// +abcdefghijklmnopqrstuvwxyz-ABCDEFGHIJKLMNOPQRSTUVWXYZ-0123456789=0123456789-ABCDEFGHIJKLMNOPQRSTUVWXYZ-abcdefghijklmnopqrstuvwxyz=:// \ No newline at end of file