mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-22 07:44:03 -04:00
AP_HAL: Fix bad buffer termination
This commit is contained in:
parent
4954c190da
commit
e47f97c5d3
@ -59,7 +59,7 @@ int AP_HAL::Util::vsnprintf(char* str, size_t size, const char *format, va_list
|
||||
print_vprintf(&buf, format, ap);
|
||||
// null terminate
|
||||
int ret = buf._offs;
|
||||
buf.write(0);
|
||||
str[ret] = '\0';
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user