Skip to content

Commit

Permalink
Merge pull request #9546 from etracer65/fix_cli_led_validation
Browse files Browse the repository at this point in the history
Fix CLI LED command validation
  • Loading branch information
mikeller committed Mar 7, 2020
1 parent fec6523 commit c7a1f7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/cli/cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -1879,7 +1879,7 @@ static void cliLed(char *cmdline)
} else {
ptr = cmdline;
i = atoi(ptr);
if (i < LED_MAX_STRIP_LENGTH) {
if (i > 0 && i < LED_MAX_STRIP_LENGTH) {
ptr = nextArg(cmdline);
if (parseLedStripConfig(i, ptr)) {
generateLedConfig((ledConfig_t *)&ledStripStatusModeConfig()->ledConfigs[i], ledConfigBuffer, sizeof(ledConfigBuffer));
Expand Down

0 comments on commit c7a1f7c

Please sign in to comment.