mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-26 00:00:39 -05:00
ENH: add error checking for option commands with too many arguments
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user