diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2005-04-26 15:31:08 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2005-04-26 15:31:08 (GMT) |
commit | d381fbfa380cc419c2e967e948f8d908020a273c (patch) | |
tree | d51079350d3ba2049d3abb1550c365e3bdc20135 /Source/kwsys | |
parent | 3db6752efbe34cd15a749fa036840dcecdd22bd6 (diff) | |
download | CMake-d381fbfa380cc419c2e967e948f8d908020a273c.zip CMake-d381fbfa380cc419c2e967e948f8d908020a273c.tar.gz CMake-d381fbfa380cc419c2e967e948f8d908020a273c.tar.bz2 |
BUG: Looks like std::string changes the result of c_str() call. This fixes potential problems
Diffstat (limited to 'Source/kwsys')
-rw-r--r-- | Source/kwsys/SystemTools.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx index f1b59ba..7678601 100644 --- a/Source/kwsys/SystemTools.cxx +++ b/Source/kwsys/SystemTools.cxx @@ -1222,6 +1222,7 @@ void SystemTools::ConvertToUnixSlashes(kwsys_stl::string& path) if(!path.empty()) { // if there is a tilda ~ then replace it with HOME + pathCString = path.c_str(); if(*pathCString == '~') { const char* homeEnv = SystemTools::GetEnv("HOME"); @@ -1231,6 +1232,7 @@ void SystemTools::ConvertToUnixSlashes(kwsys_stl::string& path) } } + pathCString = path.c_str(); if (*(pathCString+(path.size()-1)) == '/') { path = path.substr(0, path.size()-1); |