Merge pull request #7023 from etracer65/cli_map_default

Fix missing string terminator for CLI map command defaults output
This commit is contained in:
Michael Keller 2018-11-03 16:39:07 +13:00 committed by GitHub
commit 8a31801cd9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -2616,7 +2616,10 @@ static void printMap(uint8_t dumpMask, const rxConfig_t *rxConfig, const rxConfi
buf[i] = '\0';
const char *formatMap = "map %s";
cliDefaultPrintLinef(dumpMask, equalsDefault, formatMap, bufDefault);
if (defaultRxConfig) {
bufDefault[i] = '\0';
cliDefaultPrintLinef(dumpMask, equalsDefault, formatMap, bufDefault);
}
cliDumpPrintLinef(dumpMask, equalsDefault, formatMap, buf);
}