diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2001-05-09 13:52:21 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2001-05-09 13:52:21 (GMT) |
commit | df5059949db1e9b5e954300abbb8a1729b429991 (patch) | |
tree | a5628274ccb0c12fd7de3bb05f9c493f8ae71ff0 /Source/cmConfigureFileCommand.cxx | |
parent | cb6bc6f0aa254a0eb5910aa5a9a36ee1c15f46e3 (diff) | |
download | CMake-df5059949db1e9b5e954300abbb8a1729b429991.zip CMake-df5059949db1e9b5e954300abbb8a1729b429991.tar.gz CMake-df5059949db1e9b5e954300abbb8a1729b429991.tar.bz2 |
BUG: fix use beyond end of array
Diffstat (limited to 'Source/cmConfigureFileCommand.cxx')
-rw-r--r-- | Source/cmConfigureFileCommand.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/cmConfigureFileCommand.cxx b/Source/cmConfigureFileCommand.cxx index 77171a2..fdc3d02 100644 --- a/Source/cmConfigureFileCommand.cxx +++ b/Source/cmConfigureFileCommand.cxx @@ -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; } |