ENH: add error checking for option commands with too many arguments

This commit is contained in:
Bill Hoffman 2002-03-11 16:04:22 -05:00
parent fc933df1fc
commit 433e1128ab

View File

@ -19,7 +19,7 @@
// cmOptionCommand // cmOptionCommand
bool cmOptionCommand::InitialPass(std::vector<std::string> const& args) bool cmOptionCommand::InitialPass(std::vector<std::string> const& args)
{ {
if(args.size() < 2) if(args.size() < 2 || args.size() > 3)
{ {
this->SetError("called with incorrect number of arguments"); this->SetError("called with incorrect number of arguments");
return false; return false;