Skip to content

Commit

Permalink
fix(message): fixed error by test #1145
Browse files Browse the repository at this point in the history
  • Loading branch information
hitenkoku committed Sep 2, 2023
1 parent 29f36d0 commit 7b0684c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/detections/message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,10 @@ pub fn insert(
} else {
replaced_profiles
.push((key.to_owned(), Details(detect_info.detail.clone().into())));
detect_info.details_convert_map.insert(
"#Details".into(),
detect_info.detail.split(" ¦ ").map(|x| x.into()).collect(),
);
// メモリの節約のためにDetailsの中身を空にする
detect_info.detail = CompactString::default();
}
Expand Down Expand Up @@ -371,7 +375,8 @@ pub fn parse_message(
// JSON出力の場合は各種のaliasを置き換える処理はafterfactの出力用の関数で行うため、ここでは行わない
if !json_timeline_flag {
return_message = CompactString::new(return_message.replace(k.as_str(), v[0].as_str()));
} else {
}
if detail_key.len() > i {
details_key_and_value.push(format!("{}: {}", detail_key[i], v[0]).into());
}
}
Expand Down

0 comments on commit 7b0684c

Please sign in to comment.