1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-13 11:29:58 +03:00

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%.
This commit is contained in:
markhermelinggt 2019-11-19 09:46:09 -05:00 committed by GitHub
parent 5dd8fee755
commit 8c47e3334b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;
}