From 8c47e3334b7ed0e3f1ee057b0068bdd31d3cc80b Mon Sep 17 00:00:00 2001 From: markhermelinggt Date: Tue, 19 Nov 2019 09:46:09 -0500 Subject: [PATCH] Copy-paste error on line 2829 in cli.c Found through static analysis (GrammaTech CodeSonar). I am quite convinced that the VTX_TABLE_MAX_BANDS on line 2829 should be VTX_TABLE_MAX_CHANNELS. Possible the same replacement should be done on Line 2834, but I am not 100%. --- src/main/cli/cli.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/cli/cli.c b/src/main/cli/cli.c index dc4a960c62..7e5f7d1e6e 100644 --- a/src/main/cli/cli.c +++ b/src/main/cli/cli.c @@ -2826,7 +2826,7 @@ static void cliVtxTable(char *cmdline) tok = strtok_r(NULL, " ", &saveptr); int channels = atoi(tok); - if (channels < 0 || channels > VTX_TABLE_MAX_BANDS) { + if (channels < 0 || channels > VTX_TABLE_MAX_CHANNELS) { cliPrintErrorLinef("INVALID CHANNEL COUNT (SHOULD BE BETWEEN 0 AND %d)", VTX_TABLE_MAX_CHANNELS); return; }