From acef75319c6209bc1f724b08d857fd9cf262955e Mon Sep 17 00:00:00 2001 From: rmackay9 Date: Mon, 16 Jul 2012 00:38:58 +0900 Subject: [PATCH] AP_MotorsMatrix: small bug fix to limit checking on remove_motor call. Fix thanks to Michael Peschel! --- libraries/AP_Motors/AP_MotorsMatrix.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_Motors/AP_MotorsMatrix.cpp b/libraries/AP_Motors/AP_MotorsMatrix.cpp index ccb67ee9e1..ea35497b30 100644 --- a/libraries/AP_Motors/AP_MotorsMatrix.cpp +++ b/libraries/AP_Motors/AP_MotorsMatrix.cpp @@ -306,7 +306,7 @@ void AP_MotorsMatrix::remove_motor(int8_t motor_num) int8_t i; // ensure valid motor number is provided - if( motor_num >= 0 && motor_num <= AP_MOTORS_MAX_NUM_MOTORS ) { + if( motor_num >= 0 && motor_num < AP_MOTORS_MAX_NUM_MOTORS ) { // if the motor was enabled decrement the number of motors if( motor_enabled[motor_num] )