From df5059949db1e9b5e954300abbb8a1729b429991 Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Wed, 9 May 2001 09:52:21 -0400 Subject: BUG: fix use beyond end of array --- Source/cmConfigureFileCommand.cxx | 8 +++++--- 1 file 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& 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; } -- cgit v0.12