From fa24697df6ea09c2aa8df6668e9adb2ffeeae4c2 Mon Sep 17 00:00:00 2001 From: mikeller Date: Sun, 3 Jun 2018 22:43:12 +1200 Subject: [PATCH] Make it terminate the string properly. --- src/main/io/osd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/io/osd.c b/src/main/io/osd.c index f4051ff1a9..c0829e2718 100644 --- a/src/main/io/osd.c +++ b/src/main/io/osd.c @@ -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)