diff --git a/AntennaTracker/RC_Channel.h b/AntennaTracker/RC_Channel.h index 5e10baad17..0b4a20a4a4 100644 --- a/AntennaTracker/RC_Channel.h +++ b/AntennaTracker/RC_Channel.h @@ -19,7 +19,7 @@ public: RC_Channel_Tracker obj_channels[NUM_RC_CHANNELS]; RC_Channel_Tracker *channel(const uint8_t chan) override { - if (chan > NUM_RC_CHANNELS) { + if (chan >= NUM_RC_CHANNELS) { return nullptr; } return &obj_channels[chan];