Commit 0aeb0b88 authored by Brad King's avatar Brad King
Browse files

BUG: strlen(buffer) from getline may be 2 less than gcount on windows because...

BUG: strlen(buffer) from getline may be 2 less than gcount on windows because both the CR and LF characters may be removed.
parent d58ce81f
......@@ -2422,7 +2422,7 @@ bool cmSystemTools::GetLineFromStream(std::istream& is, std::string& line)
// If newline character was read, the gcount includes the
// character, but the buffer does not. The end of line has been
// reached.
if(strlen(buffer) == static_cast<size_t>(is.gcount()-1))
if(strlen(buffer) < static_cast<size_t>(is.gcount()))
{
break;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment