mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-25 10:08:28 -04:00
GCS_MAVLink: prevent asan errors in send_text_all
This commit is contained in:
parent
a566ebe4ec
commit
c750cbebfb
@ -1152,17 +1152,11 @@ void GCS_MAVLINK::send_statustext_all(const prog_char_t *msg)
|
|||||||
if ((1U<<i) & mavlink_active) {
|
if ((1U<<i) & mavlink_active) {
|
||||||
mavlink_channel_t chan = (mavlink_channel_t)i;
|
mavlink_channel_t chan = (mavlink_channel_t)i;
|
||||||
if (comm_get_txspace(chan) >= MAVLINK_NUM_NON_PAYLOAD_BYTES + MAVLINK_MSG_ID_STATUSTEXT_LEN) {
|
if (comm_get_txspace(chan) >= MAVLINK_NUM_NON_PAYLOAD_BYTES + MAVLINK_MSG_ID_STATUSTEXT_LEN) {
|
||||||
#if CONFIG_HAL_BOARD == HAL_BOARD_APM1 || CONFIG_HAL_BOARD == HAL_BOARD_APM2
|
|
||||||
char msg2[50];
|
char msg2[50];
|
||||||
strncpy_P(msg2, msg, sizeof(msg2));
|
strncpy_P(msg2, msg, sizeof(msg2));
|
||||||
mavlink_msg_statustext_send(chan,
|
mavlink_msg_statustext_send(chan,
|
||||||
SEVERITY_HIGH,
|
SEVERITY_HIGH,
|
||||||
msg2);
|
msg2);
|
||||||
#else
|
|
||||||
mavlink_msg_statustext_send(chan,
|
|
||||||
SEVERITY_HIGH,
|
|
||||||
msg);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user