summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorRolf Eike Beer <eike@sf-mail.de>2010-07-04 16:56:05 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2010-12-08 21:38:30 (GMT)
commit36cb701690b201136ca4892eb561da3df34ae191 (patch)
tree11d778a3cf062db774a9dd7aa12d27671ab9701d /Source
parent02a8ea2d5b0b41858be8a9e28d41e06af744fd0b (diff)
downloadCMake-36cb701690b201136ca4892eb561da3df34ae191.zip
CMake-36cb701690b201136ca4892eb561da3df34ae191.tar.gz
CMake-36cb701690b201136ca4892eb561da3df34ae191.tar.bz2
allow STRING(SUBSTRING) work with length -1 as "rest of the string"
This fixes the first half of bug 10740.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmStringCommand.cxx2
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 << " - "