AP_RCTelemetry: use strncpy_noterm

This commit is contained in:
Andrew Tridgell 2020-07-07 13:14:35 +10:00
parent f80ca85428
commit 7e41874d8f
1 changed files with 1 additions and 1 deletions

View File

@ -147,7 +147,7 @@ void AP_RCTelemetry::queue_message(MAV_SEVERITY severity, const char *text)
mavlink_statustext_t statustext{}; mavlink_statustext_t statustext{};
statustext.severity = severity; statustext.severity = severity;
strncpy(statustext.text, text, sizeof(statustext.text)); strncpy_noterm(statustext.text, text, sizeof(statustext.text));
// The force push will ensure comm links do not block other comm links forever if they fail. // The force push will ensure comm links do not block other comm links forever if they fail.
// If we push to a full buffer then we overwrite the oldest entry, effectively removing the // If we push to a full buffer then we overwrite the oldest entry, effectively removing the