Skip to content

Commit

Permalink
Set lengths for strings in band and mode
Browse files Browse the repository at this point in the history
  • Loading branch information
MrD-RC committed Nov 9, 2024
1 parent 363bf09 commit 026ca58
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/io/osd.c
Original file line number Diff line number Diff line change
Expand Up @@ -2585,13 +2585,13 @@ static bool osdDrawSingleElement(uint8_t item)
}
case OSD_RX_BAND:
displayWriteChar(osdDisplayPort, elemPosX++, elemPosY, SYM_RX_BAND);
strcat(buff, rxLinkStatistics.band);
tfp_sprintf(buff, "%4s", rxLinkStatistics.band);
buff[4] = '\0';
break;

case OSD_RX_MODE:
displayWriteChar(osdDisplayPort, elemPosX++, elemPosY, SYM_RX_MODE);
strcat(buff, rxLinkStatistics.mode);
tfp_sprintf(buff, "%6s", rxLinkStatistics.mode);
buff[6] = '\0';
break;
#endif
Expand Down

0 comments on commit 026ca58

Please sign in to comment.