uORB: fix copy-paste mistake in orb_print_message_internal

Could have led to invalid memory access.
This commit is contained in:
Beat Küng 2022-01-20 16:34:41 +01:00 committed by Daniel Agar
parent a2260e53da
commit bcd057ac3e
1 changed files with 1 additions and 1 deletions

View File

@ -439,7 +439,7 @@ void orb_print_message_internal(const orb_metadata *meta, const void *data, bool
}
memcpy(topic_name, meta->o_fields + format_idx, topic_name_len);
field_name[topic_name_len] = '\0';
topic_name[topic_name_len] = '\0';
// find the metadata
const orb_metadata *const *topics = orb_get_topics();