diff options
author | Brad King <brad.king@kitware.com> | 2010-12-14 19:39:10 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2010-12-14 19:39:10 (GMT) |
commit | 2d1aa4ad06eedf6bc677c8ebf757f4978a839e02 (patch) | |
tree | f029a675fd21339902b3e7f3475e12a19b30fde4 /Source | |
parent | 9e7e106dcbf9112f80b6a4eed35b5927df61416d (diff) | |
parent | 36cb701690b201136ca4892eb561da3df34ae191 (diff) | |
download | CMake-2d1aa4ad06eedf6bc677c8ebf757f4978a839e02.zip CMake-2d1aa4ad06eedf6bc677c8ebf757f4978a839e02.tar.gz CMake-2d1aa4ad06eedf6bc677c8ebf757f4978a839e02.tar.bz2 |
Merge topic 'dev/support-substring-negative-indices'
36cb701 allow STRING(SUBSTRING) work with length -1 as "rest of the string"
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmStringCommand.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmStringCommand.cxx b/Source/cmStringCommand.cxx index 19f5c0f..2b4414d 100644 --- a/Source/cmStringCommand.cxx +++ b/Source/cmStringCommand.cxx @@ -606,7 +606,7 @@ bool cmStringCommand::HandleSubstringCommand(std::vector<std::string> const& return false; } int leftOverLength = intStringLength - begin; - if ( end < 0 || end > leftOverLength ) + if ( end < -1 || end > leftOverLength ) { cmOStringStream ostr; ostr << "end index: " << end << " is out of range " << 0 << " - " |