From 1dc9e1114bfbed51b72dee298c9a52467dc6b922 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dennis=20Sch=C3=B6n?= Date: Sun, 24 Nov 2024 16:59:05 +0100 Subject: [PATCH] Fix bounds checks in FGFCS (#1191) --- src/models/FGFCS.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/models/FGFCS.cpp b/src/models/FGFCS.cpp index 09d172642..f012d9058 100644 --- a/src/models/FGFCS.cpp +++ b/src/models/FGFCS.cpp @@ -319,7 +319,7 @@ void FGFCS::SetDspPos( int form , double pos ) void FGFCS::SetThrottleCmd(int engineNum, double setting) { - if (engineNum < (int)ThrottlePos.size()) { + if (engineNum < (int)ThrottleCmd.size()) { if (engineNum < 0) { for (unsigned int ctr=0; ctrGetLogger(), LogLevel::ERROR); log << "Cannot get throttle value for ALL engines" << endl; @@ -397,7 +397,7 @@ double FGFCS::GetThrottlePos(int engineNum) const void FGFCS::SetMixtureCmd(int engineNum, double setting) { - if (engineNum < (int)ThrottlePos.size()) { + if (engineNum < (int)MixtureCmd.size()) { if (engineNum < 0) { for (unsigned int ctr=0; ctr