[PATCH] covoar/ Explanations.cc: Handle newline at end of file

Alex White alex.white at oarcorp.com
Fri Jun 18 21:00:13 UTC 2021


---
 tester/covoar/Explanations.cc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tester/covoar/Explanations.cc b/tester/covoar/Explanations.cc
index 1449fb2..64cad5c 100644
--- a/tester/covoar/Explanations.cc
+++ b/tester/covoar/Explanations.cc
@@ -87,6 +87,9 @@ namespace Coverage {
       // Get the explanation
       while (1) {
         explain.getline( inputBuffer, MAX_LINE_LENGTH );
+        if (explain.eof()) {
+          break;
+        }
         // fprintf( stderr, "%d - %s\n", line, inputBuffer );
         if (explain.fail()) {
           std::ostringstream what;
-- 
2.27.0



More information about the devel mailing list