summaryrefslogtreecommitdiffstats
path: root/Source/cmStringCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmStringCommand.cxx')
-rw-r--r--Source/cmStringCommand.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmStringCommand.cxx b/Source/cmStringCommand.cxx
index bab08fe..949fcf5 100644
--- a/Source/cmStringCommand.cxx
+++ b/Source/cmStringCommand.cxx
@@ -608,7 +608,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 << " - "