summaryrefslogtreecommitdiff
path: root/Source/CTest/cmProcess.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2010-01-28 16:48:20 -0500
committerBrad King <brad.king@kitware.com>2010-01-28 16:48:20 -0500
commitdc1d2189ae922be9d6e7f5fde698532db47e46aa (patch)
tree28ef61aac78f0bdc190a760d53b6cb89b24262cd /Source/CTest/cmProcess.cxx
parent612409e5b01a7e4823bb379ee9e002177793eb75 (diff)
downloadcmake-dc1d2189ae922be9d6e7f5fde698532db47e46aa.tar.gz
CMake 2.8.1-rc1
Diffstat (limited to 'Source/CTest/cmProcess.cxx')
-rw-r--r--Source/CTest/cmProcess.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/CTest/cmProcess.cxx b/Source/CTest/cmProcess.cxx
index 1895066a83..b028cc0875 100644
--- a/Source/CTest/cmProcess.cxx
+++ b/Source/CTest/cmProcess.cxx
@@ -79,7 +79,10 @@ bool cmProcess::Buffer::GetLine(std::string& line)
// Extract the range first..last as a line.
const char* text = &*this->begin() + this->First;
size_type length = this->Last - this->First;
- length -= (length && text[length-1] == '\r')? 1:0;
+ while(length && text[length-1] == '\r')
+ {
+ length --;
+ }
line.assign(text, length);
// Start a new range for the next line.