mirror of https://github.com/ArduPilot/ardupilot
DataFlash: account for snprintf now null-terminating strings
This commit is contained in:
parent
de3244e26c
commit
4c794ebba3
|
@ -431,7 +431,7 @@ bool DataFlash_Class::logging_failed() const
|
|||
|
||||
void DataFlash_Class::Log_Write_MessageF(const char *fmt, ...)
|
||||
{
|
||||
char msg[64] {};
|
||||
char msg[65] {}; // sizeof(log_Message.msg) + null-termination
|
||||
|
||||
va_list ap;
|
||||
va_start(ap, fmt);
|
||||
|
|
|
@ -408,7 +408,7 @@ bool DataFlash_Backend::ShouldLog(bool is_critical)
|
|||
|
||||
bool DataFlash_Backend::Log_Write_MessageF(const char *fmt, ...)
|
||||
{
|
||||
char msg[64] {};
|
||||
char msg[65] {}; // sizeof(log_Message.msg) + null-termination
|
||||
|
||||
va_list ap;
|
||||
va_start(ap, fmt);
|
||||
|
|
Loading…
Reference in New Issue