Przeglądaj źródła

Fix bug: was expanding second arg even if not passed. crashed

Sebastien Barre 24 lat temu
rodzic
commit
6d1a312c7b
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      Source/cmExecProgramCommand.cxx

+ 2 - 2
Source/cmExecProgramCommand.cxx

@@ -51,10 +51,10 @@ bool cmExecProgramCommand::InitialPass(std::vector<std::string> const& argsIn)
     return false;
     }
   std::string output;
-    m_Makefile->ExpandVariablesInString(args[0]);
-    m_Makefile->ExpandVariablesInString(args[1]);
+  m_Makefile->ExpandVariablesInString(args[0]);
   if(args.size() == 2)
     {
+    m_Makefile->ExpandVariablesInString(args[1]);
     cmSystemTools::MakeDirectory(args[1].c_str());
     std::string command;
     command = "cd ";