[PATCH] covoar/Explanations.cc: Remove unnecessary newline strip

Alex White alex.white at oarcorp.com
Fri Jun 25 03:40:55 UTC 2021


This corrects an issue where the starting line numbers of explanations
had their last digit removed. This was caused by code left over for
handling C file IO where the newline was included in the buffer.
---
 tester/covoar/Explanations.cc | 2 --
 1 file changed, 2 deletions(-)

diff --git a/tester/covoar/Explanations.cc b/tester/covoar/Explanations.cc
index 4d177eb..91e65f2 100644
--- a/tester/covoar/Explanations.cc
+++ b/tester/covoar/Explanations.cc
@@ -55,7 +55,6 @@ namespace Coverage {
         if (explain.fail()) {
           return;
         }
-        inputBuffer[ strlen(inputBuffer) - 1] = '\0';
         line++;
       } while ( inputBuffer[0] == '\0' );
 
@@ -80,7 +79,6 @@ namespace Coverage {
              << "out of sync at the classification";
         throw rld::error( what, "Explanations::load" );
       }
-      inputBuffer[ strlen(inputBuffer) - 1] = '\0';
       e.classification = inputBuffer;
       line++;
 
-- 
2.27.0



More information about the devel mailing list