Browse Source

BUG: On Windows, remove extra CR characters. Hopefully this will result in not duplicated new-lines

Andy Cedilnik 21 years ago
parent
commit
9594c888ab
1 changed files with 5 additions and 1 deletions
  1. 5 1
      Source/cmCTest.cxx

+ 5 - 1
Source/cmCTest.cxx

@@ -155,7 +155,11 @@ std::string cmCTest::MakeXMLSafe(const std::string& str)
   for (std::string::size_type  pos = 0; pos < str.size(); pos ++ )
     {
     unsigned char ch = str[pos];
-    if ( (ch > 126 || ch < 32) && ch != 9  && ch != 10 && ch != 13 )
+    if ( ch == '\r' )
+      {
+      // Ignore extra CR characters.
+      }
+    else if ( (ch > 126 || ch < 32) && ch != 9  && ch != 10 && ch != 13 )
       {
       char buffer[33];
       sprintf(buffer, "&lt;%d&gt;", (int)ch);