Browse Source

BUG: fix use beyond end of array

Bill Hoffman 24 years ago
parent
commit
df5059949d
1 changed files with 5 additions and 3 deletions
  1. 5 3
      Source/cmConfigureFileCommand.cxx

+ 5 - 3
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;
 }