From 0aeb0b88929988c6346ec0516e504f2090f1a79b Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 1 Apr 2003 13:29:36 -0500 Subject: [PATCH] BUG: strlen(buffer) from getline may be 2 less than gcount on windows because both the CR and LF characters may be removed. --- Source/cmSystemTools.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index c85aeec30..085849a57 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -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(is.gcount()-1)) + if(strlen(buffer) < static_cast(is.gcount())) { break; }