Skip to content

Commit

Permalink
Fix the error
Browse files Browse the repository at this point in the history
  • Loading branch information
LinZhihao-723 committed Aug 15, 2024
1 parent 7cd1ea7 commit 6dd95a6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion components/core/src/clp/ffi/KeyValuePairLogEvent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,10 @@ auto validate_node_id_value_pairs(
auto const parent_node_id{node.get_parent_id()};
auto const key_name{node.get_key_name()};
if (parent_node_id_to_key_names.contains(parent_node_id)) {
if (parent_node_id_to_key_names.at(parent_node_id).contains(key_name)) {
auto const [it, new_key_inserted]{
parent_node_id_to_key_names.at(parent_node_id).emplace(key_name)
};
if (false == new_key_inserted) {
// The key is duplicated under the same parent
return std::errc::protocol_not_supported;
}
Expand Down

0 comments on commit 6dd95a6

Please sign in to comment.