mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 04:23:33 +08:00
pwm_out_sim PWM_SERVO_SET_MIN_PWM fix index check
- fixes coverity CID 264261
This commit is contained in:
@@ -355,7 +355,7 @@ PWMSim::ioctl(device::file_t *filp, int cmd, unsigned long arg)
|
||||
|
||||
for (unsigned i = 0; i < pwm->channel_count; i++) {
|
||||
|
||||
if (i <= MAX_ACTUATORS) {
|
||||
if (i < MAX_ACTUATORS) {
|
||||
_pwm_min[i] = pwm->values[i];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user