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