1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-17 13:25:30 +03:00

Additional fixes after feedback

This commit is contained in:
KiteAnton 2016-07-15 19:18:11 +02:00
parent 1ee8224706
commit 6c63aa78ca
2 changed files with 2 additions and 2 deletions

View file

@ -2502,7 +2502,7 @@ static void cliName(char *cmdline)
{
uint32_t len = strlen(cmdline);
if (*cmdline == 0) {
if (len == 0) {
cliPrintf("name %s\r\n", masterConfig.name);
} else if ('-' == cmdline[0]) {
memset(masterConfig.name, '\0', MAX_NAME_LENGTH);

View file

@ -1878,7 +1878,7 @@ static bool processInCommand(void)
break;
case MSP_SET_NAME:
memset(masterConfig.name, '\0', MAX_NAME_LENGTH);
memset(masterConfig.name, 0, MAX_NAME_LENGTH+1);
for (i = 0; i < MIN(MAX_NAME_LENGTH, currentPort->dataSize); i++) {
masterConfig.name[i] = read8();
}