diff options
-rw-r--r-- | Source/cmFileCommand.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index b3bbb09..bbf4265 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -233,6 +233,11 @@ bool cmFileCommand::HandleGlobCommand(std::vector<std::string> const& args, } g.SetRelative(i->c_str()); ++i; + if(i == args.end()) + { + this->SetError("GLOB requires a glob expression after the directory"); + return false; + } } if ( !cmsys::SystemTools::FileIsFullPath(i->c_str()) ) { |