diff options
Diffstat (limited to 'Source/cmListCommand.cxx')
-rw-r--r-- | Source/cmListCommand.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Source/cmListCommand.cxx b/Source/cmListCommand.cxx index ba0c843..d7de2fa 100644 --- a/Source/cmListCommand.cxx +++ b/Source/cmListCommand.cxx @@ -289,12 +289,10 @@ bool cmListCommand::HandleInsertCommand(std::vector<std::string> const& args) if (item < 0) { item = static_cast<int>(nitem) + item; } - if (item < 0 || nitem <= static_cast<size_t>(item)) { + if (item < 0 || nitem < static_cast<size_t>(item)) { std::ostringstream str; str << "index: " << item << " out of range (-" << varArgsExpanded.size() - << ", " - << (varArgsExpanded.empty() ? 0 : (varArgsExpanded.size() - 1)) - << ")"; + << ", " << varArgsExpanded.size() << ")"; this->SetError(str.str()); return false; } |