fix(script): Do not process empty script output

This commit is contained in:
Michael Carlberg 2016-05-24 23:37:16 +02:00
parent 8535f5a83d
commit 40524979d0

View File

@ -50,11 +50,14 @@ bool ScriptModule::update()
log_error(e.what()); log_error(e.what());
} }
return true; return !this->output.empty();
} }
std::string ScriptModule::get_output() std::string ScriptModule::get_output()
{ {
if (this->output.empty())
return "";
if (!this->click_left.empty()) if (!this->click_left.empty())
this->builder->cmd(Cmd::LEFT_CLICK, string::replace_all(this->click_left, "%counter%", std::to_string(this->counter))); this->builder->cmd(Cmd::LEFT_CLICK, string::replace_all(this->click_left, "%counter%", std::to_string(this->counter)));
if (!this->click_middle.empty()) if (!this->click_middle.empty())