From 9594c888abfdcfd328f46a93a929de60b8a47006 Mon Sep 17 00:00:00 2001 From: Andy Cedilnik Date: Mon, 11 Oct 2004 13:57:33 -0400 Subject: BUG: On Windows, remove extra CR characters. Hopefully this will result in not duplicated new-lines --- Source/cmCTest.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index b8cf9ac..8c5dc97 100644 --- a/Source/cmCTest.cxx +++ b/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, "<%d>", (int)ch); -- cgit v0.12