diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2005-10-20 14:11:03 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2005-10-20 14:11:03 (GMT) |
commit | 097debb55a6914b3498d4894d0169eea2e92c876 (patch) | |
tree | 14a4fd582751d8a1f1bb7563abc7cca047a7b1a2 /Source | |
parent | 1e6431801c3360085ba7bbbec9f6a432ce7efb4b (diff) | |
download | CMake-097debb55a6914b3498d4894d0169eea2e92c876.zip CMake-097debb55a6914b3498d4894d0169eea2e92c876.tar.gz CMake-097debb55a6914b3498d4894d0169eea2e92c876.tar.bz2 |
BUG: end is not really end, but rather length
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmStringCommand.cxx | 2 | ||||
-rw-r--r-- | Source/cmStringCommand.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmStringCommand.cxx b/Source/cmStringCommand.cxx index eacbfed..aa24a02 100644 --- a/Source/cmStringCommand.cxx +++ b/Source/cmStringCommand.cxx @@ -555,7 +555,7 @@ bool cmStringCommand::HandleSubstringCommand(std::vector<std::string> const& arg return false; } int leftOverLength = intStringLength - begin; - if ( end < 0 || end > intStringLength ) + if ( end < 0 || end > leftOverLength ) { cmOStringStream ostr; ostr << "end index: " << end << " is out of range " << 0 << " - " << leftOverLength; diff --git a/Source/cmStringCommand.h b/Source/cmStringCommand.h index 8c6a11c..fc846d3 100644 --- a/Source/cmStringCommand.h +++ b/Source/cmStringCommand.h @@ -84,7 +84,7 @@ public: " STRING(TOUPPER <string1> <output variable>)\n" " STRING(TOLOWER <string1> <output variable>)\n" " STRING(LENGTH <string> <output variable>)\n" - " STRING(SUBSTRING <string> <begin> <end> <output variable>)\n" + " STRING(SUBSTRING <string> <begin> <length> <output variable>)\n" "REGEX MATCH will match the regular expression once and store the " "match in the output variable.\n" "REGEX MATCHALL will match the regular expression as many times as " |