summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmSystemTools.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 4af4242..f2ef341 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -90,6 +90,11 @@ void cmSystemTools::GetPath(std::vector<std::string>& path)
const char* pathSep = ":";
#endif
std::string pathEnv = getenv("PATH");
+ // A hack to make the below algorithm work.
+ if(pathEnv[pathEnv.length()-1] != ':')
+ {
+ pathEnv += ":";
+ }
std::string::size_type start =0;
bool done = false;
while(!done)