summaryrefslogtreecommitdiffstats
path: root/Source/cmCTest.cxx
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2004-10-11 17:57:33 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2004-10-11 17:57:33 (GMT)
commit9594c888abfdcfd328f46a93a929de60b8a47006 (patch)
tree61b8c23f79530906046315a98ac0561f1cb7352b /Source/cmCTest.cxx
parentd4f1785473418478b5c69316ed2a4101a1789f6b (diff)
downloadCMake-9594c888abfdcfd328f46a93a929de60b8a47006.zip
CMake-9594c888abfdcfd328f46a93a929de60b8a47006.tar.gz
CMake-9594c888abfdcfd328f46a93a929de60b8a47006.tar.bz2
BUG: On Windows, remove extra CR characters. Hopefully this will result in not duplicated new-lines
Diffstat (limited to 'Source/cmCTest.cxx')
-rw-r--r--Source/cmCTest.cxx6
1 files changed, 5 insertions, 1 deletions
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, "&lt;%d&gt;", (int)ch);