diff options
author | Brad King <brad.king@kitware.com> | 2003-04-01 18:29:36 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2003-04-01 18:29:36 (GMT) |
commit | 0aeb0b88929988c6346ec0516e504f2090f1a79b (patch) | |
tree | 60279e801952fe21262d8140792407132b0dd475 /Source | |
parent | d58ce81fc08fc3f56d7fe281f740e04dc9903d74 (diff) | |
download | CMake-0aeb0b88929988c6346ec0516e504f2090f1a79b.zip CMake-0aeb0b88929988c6346ec0516e504f2090f1a79b.tar.gz CMake-0aeb0b88929988c6346ec0516e504f2090f1a79b.tar.bz2 |
BUG: strlen(buffer) from getline may be 2 less than gcount on windows because both the CR and LF characters may be removed.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmSystemTools.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index c85aeec..085849a 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<size_t>(is.gcount()-1)) + if(strlen(buffer) < static_cast<size_t>(is.gcount())) { break; } |