Fix m accuracy initialization inside the Rule class

This commit is contained in:
Felipe Zimmerle 2016-02-15 15:47:36 -03:00
parent a2ffb36159
commit 8647d63e90

View File

@ -98,6 +98,7 @@ Rule::Rule(Operator *_op,
op(_op), op(_op),
rule_id(0), rule_id(0),
phase(-1), phase(-1),
m_accuracy(0),
m_unconditional(false), m_unconditional(false),
m_secmarker(false), m_secmarker(false),
m_marker(""), m_marker(""),
@ -503,7 +504,6 @@ bool Rule::evaluate(Transaction *trasn) {
} }
} }
} }
} else { } else {
#ifndef NO_LOGS #ifndef NO_LOGS
trasn->debug(4, "Rule returned 0."); trasn->debug(4, "Rule returned 0.");
@ -517,7 +517,7 @@ bool Rule::evaluate(Transaction *trasn) {
} }
} }
if (!m_log_message.empty() || !m_log_data.empty()) { if ((!m_log_message.empty() || !m_log_data.empty()) && !ruleMessage->m_match.empty()) {
ruleMessage->m_data = m_log_data; ruleMessage->m_data = m_log_data;
trasn->m_rulesMessages.push_back(ruleMessage); trasn->m_rulesMessages.push_back(ruleMessage);
} }