diff --git a/rust/src/applayertemplate/template.rs b/rust/src/applayertemplate/template.rs index e8cdc27dfe91..1bfd6b81c284 100644 --- a/rust/src/applayertemplate/template.rs +++ b/rust/src/applayertemplate/template.rs @@ -96,7 +96,7 @@ impl TemplateState { let mut index = 0; for i in 0..len { let tx = &self.transactions[i]; - if tx.tx_id == tx_id + 1 { + if tx.tx_id == tx_id { found = true; index = i; break; @@ -108,7 +108,7 @@ impl TemplateState { } pub fn get_tx(&mut self, tx_id: u64) -> Option<&TemplateTransaction> { - self.transactions.iter().find(|tx| tx.tx_id == tx_id + 1) + self.transactions.iter().find(|tx| tx.tx_id == tx_id) } fn new_tx(&mut self) -> TemplateTransaction {