mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-21 22:50:26 -06:00
BUG: fix use beyond end of array
This commit is contained in:
@@ -51,11 +51,13 @@ bool cmConfigureFileCommand::Invoke(std::vector<std::string>& args)
|
||||
m_InputFile = args[0];
|
||||
m_OuputFile = args[1];
|
||||
m_CopyOnly = false;
|
||||
if(args[2] == "COPYONLY")
|
||||
if(args.size() >= 3)
|
||||
{
|
||||
m_CopyOnly = true;
|
||||
if(args[2] == "COPYONLY")
|
||||
{
|
||||
m_CopyOnly = true;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user