Browse Source

GCS_MAVLink: fixed assumption on return of snprintf

master
Andrew Tridgell 6 years ago
parent
commit
98c2606c0a
  1. 1
      libraries/GCS_MAVLink/GCS_Common.cpp

1
libraries/GCS_MAVLink/GCS_Common.cpp

@ -2631,6 +2631,7 @@ void GCS_MAVLINK::handle_statustext(const mavlink_message_t &msg) @@ -2631,6 +2631,7 @@ void GCS_MAVLINK::handle_statustext(const mavlink_message_t &msg)
"SRC=%u/%u:",
msg.sysid,
msg.compid);
offset = MIN(offset, max_prefix_len);
}
memcpy(&text[offset], packet.text, MAVLINK_MSG_STATUSTEXT_FIELD_TEXT_LEN);

Loading…
Cancel
Save