mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-07 00:13:59 -04:00
AP_ADSB: fix snprintf warning
This commit is contained in:
parent
a1fd1cb9b2
commit
9ada804489
@ -639,7 +639,7 @@ uint8_t AP_ADSB::get_encoded_callsign_null_char()
|
||||
|
||||
// using the above logic, we must always assign the squawk. once we get configured
|
||||
// externally then get_encoded_callsign_null_char() stops getting called
|
||||
snprintf(out_state.cfg.callsign, 4, "%04d", unsigned(out_state.cfg.squawk_octal));
|
||||
snprintf(out_state.cfg.callsign, 5, "%04d", unsigned(out_state.cfg.squawk_octal));
|
||||
memset(&out_state.cfg.callsign[4], 0, 5); // clear remaining 5 chars
|
||||
encoded_null |= 0x40;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user