1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-14 20:10:18 +03:00

Merge pull request #331 from ledvinap/fix-rxmap

fix index overflow in channel mapping
This commit is contained in:
Dominic Clifton 2015-01-09 10:40:10 +00:00
commit 33c6d571cc

View file

@ -345,7 +345,7 @@ void parseRcChannels(const char *input, rxConfig_t *rxConfig)
for (c = input; *c; c++) {
s = strchr(rcChannelLetters, *c);
if (s)
if (s && (s < rcChannelLetters + MAX_MAPPABLE_RX_INPUTS))
rxConfig->rcmap[s - rcChannelLetters] = c - input;
}
}