BUG: check size of path error, HP gcount problem
This commit is contained in:
parent
b6121bf8a8
commit
a5349a79c3
|
@ -375,7 +375,7 @@ void cmSystemTools::ConvertToUnixSlashes(std::string& path)
|
||||||
pos++;
|
pos++;
|
||||||
}
|
}
|
||||||
// remove any trailing slash
|
// remove any trailing slash
|
||||||
if(path[path.size()-1] == '/')
|
if(path.size() && path[path.size()-1] == '/')
|
||||||
{
|
{
|
||||||
path = path.substr(0, 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())
|
while(fin.getline(buffer, buffer_length, '\n') || fin.gcount())
|
||||||
{
|
{
|
||||||
std::streamsize count = fin.gcount();
|
unsigned long count = fin.gcount();
|
||||||
if(fin.eof())
|
if(fin.eof())
|
||||||
{
|
{
|
||||||
// Final line, but with no newline.
|
// Final line, but with no newline.
|
||||||
|
|
Loading…
Reference in New Issue