mirror of https://github.com/ArduPilot/ardupilot
Copter: fixed range check for RC channel
This commit is contained in:
parent
47daebbb42
commit
0775738137
|
@ -31,7 +31,7 @@ public:
|
|||
|
||||
RC_Channel_Copter obj_channels[NUM_RC_CHANNELS];
|
||||
RC_Channel_Copter *channel(const uint8_t chan) override {
|
||||
if (chan > NUM_RC_CHANNELS) {
|
||||
if (chan >= NUM_RC_CHANNELS) {
|
||||
return nullptr;
|
||||
}
|
||||
return &obj_channels[chan];
|
||||
|
|
Loading…
Reference in New Issue