fix index overflow in channel mapping
This commit is contained in:
parent
ce49dcee31
commit
6b5f1fc38b
|
@ -345,7 +345,7 @@ void parseRcChannels(const char *input, rxConfig_t *rxConfig)
|
||||||
|
|
||||||
for (c = input; *c; c++) {
|
for (c = input; *c; c++) {
|
||||||
s = strchr(rcChannelLetters, *c);
|
s = strchr(rcChannelLetters, *c);
|
||||||
if (s)
|
if (s && (s < rcChannelLetters + MAX_MAPPABLE_RX_INPUTS))
|
||||||
rxConfig->rcmap[s - rcChannelLetters] = c - input;
|
rxConfig->rcmap[s - rcChannelLetters] = c - input;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue