From 40524979d0c7855548aa0d4a2aa8d1fd1104cf32 Mon Sep 17 00:00:00 2001 From: Michael Carlberg Date: Tue, 24 May 2016 23:37:16 +0200 Subject: [PATCH] fix(script): Do not process empty script output --- src/modules/script.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/modules/script.cpp b/src/modules/script.cpp index 5227a6cf..c695c7d0 100644 --- a/src/modules/script.cpp +++ b/src/modules/script.cpp @@ -50,11 +50,14 @@ bool ScriptModule::update() log_error(e.what()); } - return true; + return !this->output.empty(); } std::string ScriptModule::get_output() { + if (this->output.empty()) + return ""; + if (!this->click_left.empty()) this->builder->cmd(Cmd::LEFT_CLICK, string::replace_all(this->click_left, "%counter%", std::to_string(this->counter))); if (!this->click_middle.empty())