summaryrefslogtreecommitdiff
path: root/Source/cmFindPathCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-01-20 19:29:12 -0500
committerBrad King <brad.king@kitware.com>2008-01-20 19:29:12 -0500
commitce2b20361a152008994e5083b6d310e98b40e0e1 (patch)
treeea36c032cef7dca3feeef0d5df2389c6eb72b347 /Source/cmFindPathCommand.cxx
parent9f982d7d39a92fa1164a6e3f653dbce17ca38ad7 (diff)
downloadcmake-ce2b20361a152008994e5083b6d310e98b40e0e1.tar.gz
BUG: Fix previous commit to not access empty strings out of bounds.
Diffstat (limited to 'Source/cmFindPathCommand.cxx')
-rw-r--r--Source/cmFindPathCommand.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmFindPathCommand.cxx b/Source/cmFindPathCommand.cxx
index 53531dde37..628018772b 100644
--- a/Source/cmFindPathCommand.cxx
+++ b/Source/cmFindPathCommand.cxx
@@ -106,7 +106,7 @@ bool cmFindPathCommand::InitialPass(std::vector<std::string> const& argsIn)
i != this->SearchPaths.end(); ++i)
{
std::string& p = *i;
- if(p[p.size()-1] != '/')
+ if(p.empty() || p[p.size()-1] != '/')
{
p += "/";
}