From ab8f9af8ee1f7181b56c95e5335cc57345ca1231 Mon Sep 17 00:00:00 2001 From: Sean M Date: Tue, 21 Aug 2018 19:49:08 -0400 Subject: [PATCH] Allow copying of rate profile 6 --- src/main/fc/controlrate_profile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/fc/controlrate_profile.c b/src/main/fc/controlrate_profile.c index 1b60d95a4a..31089a6eb2 100644 --- a/src/main/fc/controlrate_profile.c +++ b/src/main/fc/controlrate_profile.c @@ -78,7 +78,7 @@ void changeControlRateProfile(uint8_t controlRateProfileIndex) } void copyControlRateProfile(const uint8_t dstControlRateProfileIndex, const uint8_t srcControlRateProfileIndex) { - if ((dstControlRateProfileIndex < CONTROL_RATE_PROFILE_COUNT-1 && srcControlRateProfileIndex < CONTROL_RATE_PROFILE_COUNT-1) + if ((dstControlRateProfileIndex < CONTROL_RATE_PROFILE_COUNT && srcControlRateProfileIndex < CONTROL_RATE_PROFILE_COUNT) && dstControlRateProfileIndex != srcControlRateProfileIndex ) { memcpy(controlRateProfilesMutable(dstControlRateProfileIndex), controlRateProfilesMutable(srcControlRateProfileIndex), sizeof(controlRateConfig_t));