From 9f64ced6100b8572353df4f8ac8d27146a77960a 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) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Dennis Schön --- 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