mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-13 11:29:58 +03:00
Reserve space for null terminator 2
This commit is contained in:
parent
32f408bb81
commit
5796be02d9
1 changed files with 2 additions and 4 deletions
|
@ -188,17 +188,15 @@ static CMS_Menu cmsx_menuCalibration = {
|
||||||
// Info
|
// Info
|
||||||
|
|
||||||
#if defined(USE_BOARD_INFO)
|
#if defined(USE_BOARD_INFO)
|
||||||
static char manufacturerId[MAX_MANUFACTURER_ID_LENGTH];
|
static char manufacturerId[MAX_MANUFACTURER_ID_LENGTH + 1];
|
||||||
static char boardName[MAX_BOARD_NAME_LENGTH];
|
static char boardName[MAX_BOARD_NAME_LENGTH + 1];
|
||||||
|
|
||||||
static const void *cmsx_FirmwareInit(displayPort_t *pDisp)
|
static const void *cmsx_FirmwareInit(displayPort_t *pDisp)
|
||||||
{
|
{
|
||||||
UNUSED(pDisp);
|
UNUSED(pDisp);
|
||||||
|
|
||||||
strncpy(manufacturerId, getManufacturerId(), MAX_MANUFACTURER_ID_LENGTH);
|
strncpy(manufacturerId, getManufacturerId(), MAX_MANUFACTURER_ID_LENGTH);
|
||||||
manufacturerId[MAX_MANUFACTURER_ID_LENGTH - 1] = '\0';
|
|
||||||
strncpy(boardName, getBoardName(), MAX_BOARD_NAME_LENGTH);
|
strncpy(boardName, getBoardName(), MAX_BOARD_NAME_LENGTH);
|
||||||
boardName[MAX_BOARD_NAME_LENGTH - 1] = '\0';
|
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue