BUG: strlen(buffer) from getline may be 2 less than gcount on windows because both the CR and LF characters may be removed.

This commit is contained in:
Brad King 2003-04-01 13:29:36 -05:00
parent d58ce81fc0
commit 0aeb0b8892
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}