mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-22 07:44:03 -04:00
AP_Notify: Use the number of arrays
This commit is contained in:
parent
052114541a
commit
9836b7c549
@ -473,7 +473,7 @@ void AP_Notify::play_tune(const char *tune)
|
||||
// set flight mode string
|
||||
void AP_Notify::set_flight_mode_str(const char *str)
|
||||
{
|
||||
strncpy(_flight_mode_str, str, 4);
|
||||
strncpy(_flight_mode_str, str, sizeof(_flight_mode_str));
|
||||
_flight_mode_str[sizeof(_flight_mode_str)-1] = 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user