mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
GCS_MAVLink: use strncpy_noterm
This commit is contained in:
parent
7e41874d8f
commit
5a18b16f69
@ -2220,15 +2220,15 @@ void GCS_MAVLINK::send_autopilot_version() const
|
||||
(uint32_t)(version.fw_type) << (8 * 0);
|
||||
|
||||
if (version.fw_hash_str) {
|
||||
strncpy(flight_custom_version, version.fw_hash_str, ARRAY_SIZE(flight_custom_version));
|
||||
strncpy_noterm(flight_custom_version, version.fw_hash_str, ARRAY_SIZE(flight_custom_version));
|
||||
}
|
||||
|
||||
if (version.middleware_hash_str) {
|
||||
strncpy(middleware_custom_version, version.middleware_hash_str, ARRAY_SIZE(middleware_custom_version));
|
||||
strncpy_noterm(middleware_custom_version, version.middleware_hash_str, ARRAY_SIZE(middleware_custom_version));
|
||||
}
|
||||
|
||||
if (version.os_hash_str) {
|
||||
strncpy(os_custom_version, version.os_hash_str, ARRAY_SIZE(os_custom_version));
|
||||
strncpy_noterm(os_custom_version, version.os_hash_str, ARRAY_SIZE(os_custom_version));
|
||||
}
|
||||
|
||||
mavlink_msg_autopilot_version_send(
|
||||
|
Loading…
Reference in New Issue
Block a user