diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2001-06-28 15:40:35 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2001-06-28 15:40:35 (GMT) |
commit | a5349a79c3ecea2e19125e1c7bdad7fd4dc30220 (patch) | |
tree | 6c13e394aab419cc2903817d92302b5935717348 | |
parent | b6121bf8a8146fef5ba29ab6c38749fa27904073 (diff) | |
download | CMake-a5349a79c3ecea2e19125e1c7bdad7fd4dc30220.zip CMake-a5349a79c3ecea2e19125e1c7bdad7fd4dc30220.tar.gz CMake-a5349a79c3ecea2e19125e1c7bdad7fd4dc30220.tar.bz2 |
BUG: check size of path error, HP gcount problem
-rw-r--r-- | Source/cmSystemTools.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 284f5f5..455c5ef 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -375,7 +375,7 @@ void cmSystemTools::ConvertToUnixSlashes(std::string& path) pos++; } // remove any trailing slash - if(path[path.size()-1] == '/') + if(path.size() && path[path.size()-1] == '/') { path = path.substr(0, path.size()-1); } @@ -685,7 +685,7 @@ void cmSystemTools::cmCopyFile(const char* source, } while(fin.getline(buffer, buffer_length, '\n') || fin.gcount()) { - std::streamsize count = fin.gcount(); + unsigned long count = fin.gcount(); if(fin.eof()) { // Final line, but with no newline. |