mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 06:15:16 +03:00
Make it terminate the string properly.
This commit is contained in:
parent
0aba86ccb4
commit
fa24697df6
1 changed files with 1 additions and 2 deletions
|
@ -274,10 +274,9 @@ static void osdFormatAltitudeString(char * buff, int altitude)
|
|||
{
|
||||
const int alt = osdGetMetersToSelectedUnit(altitude) / 10;
|
||||
|
||||
tfp_sprintf(buff, "%5d", alt);
|
||||
tfp_sprintf(buff, "%5d %c", alt, osdGetMetersToSelectedUnitSymbol());
|
||||
buff[5] = buff[4];
|
||||
buff[4] = '.';
|
||||
buff[6] = osdGetMetersToSelectedUnitSymbol();
|
||||
}
|
||||
|
||||
static void osdFormatPID(char * buff, const char * label, const pid8_t * pid)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue