mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-18 05:45:31 +03:00
Corrected incorrect index use in resourceCheck
This commit is contained in:
parent
ea38aa2ca7
commit
8d771c6f5c
1 changed files with 2 additions and 1 deletions
|
@ -3948,10 +3948,11 @@ static void cliResource(char *cmdline)
|
|||
cliShowArgumentRangeError("index", 1, resourceTable[resourceIndex].maxIndex);
|
||||
return;
|
||||
}
|
||||
index -= 1;
|
||||
}
|
||||
|
||||
pch = strtok_r(NULL, " ", &saveptr);
|
||||
ioTag_t *tag = (ioTag_t*)(resourceTable[resourceIndex].ptr + (index == 0 ? 0 : index - 1));
|
||||
ioTag_t *tag = (ioTag_t*)(resourceTable[resourceIndex].ptr + index);
|
||||
|
||||
uint8_t pin = 0;
|
||||
if (strlen(pch) > 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue