Unverified Commit 093115ed authored by Andrea Orlati's avatar Andrea Orlati Committed by GitHub
Browse files

fix issue #610: placeholer char is not properly checked and replaced when a...

fix issue #610: placeholer char is not properly checked and replaced when a system call is invoked (#612)
parent 84cb24de
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -100,8 +100,12 @@ IRA::CString CParser<OBJ>::executeCommand(const IRA::CString& command,IRA::CStri
			IRA::CString answer("");
			composeCall+=elem->m_syscall;
			for (WORD k=0;k<parNum;k++) {
				composeCall+=" ";
         	if (inParams[k]==IRA::CString(_SP_JOLLYCHARACTER)) {
					composeCall+=_SP_JOLLYCHARACTER_REPLACEMENT;
				}
				else {
					composeCall+=inParams[k];
            }
			}			
			/*if (system((const char *)composeCall)<0) {
				_EXCPT(ParserErrors::SystemCommandErrorExImpl,err,"CParser::executeCommand()");
+2 −1
Original line number Diff line number Diff line
@@ -189,7 +189,8 @@ int main(int argc, char *argv[])
	parser.add("answer",new function2<CTest,constant,void_type,I<string_type>, O<longString_type> >(&test,&CTest::answer),1);


	parser.add("naviga","firefox",1);
	parser.add("naviga","firefox",0);
	parser.add("terminale","xterm -title ",1);

	parser.add("remoteok","extern",0,&CTest::remoteCall);
	parser.add("remotefail","extern",1,&CTest::remoteCall);