summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2002-03-11 21:04:22 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2002-03-11 21:04:22 (GMT)
commit433e1128ab14897932b8c6eeae17f2fc861e7636 (patch)
tree4894ce7b36640608ac7669f3bfa8aca5e1930f26 /Source
parentfc933df1fc303f305735d28e9e8a0fb43b41ca1a (diff)
downloadCMake-433e1128ab14897932b8c6eeae17f2fc861e7636.zip
CMake-433e1128ab14897932b8c6eeae17f2fc861e7636.tar.gz
CMake-433e1128ab14897932b8c6eeae17f2fc861e7636.tar.bz2
ENH: add error checking for option commands with too many arguments
Diffstat (limited to 'Source')
-rw-r--r--Source/cmOptionCommand.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmOptionCommand.cxx b/Source/cmOptionCommand.cxx
index 8c389f8..2a943b8 100644
--- a/Source/cmOptionCommand.cxx
+++ b/Source/cmOptionCommand.cxx
@@ -19,7 +19,7 @@
// cmOptionCommand
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");
return false;