]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/FGTable.cpp
Fix stall widths for the "auxilliary" (reverse flow) stalls so they
[flightgear.git] / src / FDM / JSBSim / FGTable.cpp
index 62fdf465e4fb5e76d3aded620abffac0b9fb9fd6..f54418f2044d074bc5a0de2f285d72fa99abf028 100644 (file)
@@ -66,6 +66,7 @@ FGTable::FGTable(int NRows, int NCols, int NTables)
   Data = Allocate(); // this data array will contain the keys for the associated tables
   Tables.reserve(nTables);
   for (int i=0; i<nTables; i++) Tables.push_back(FGTable(NRows, NCols));
+  lastRowIndex=lastColumnIndex=2;
 
   Debug(0);
 }
@@ -282,7 +283,7 @@ double FGTable::GetValue(double rowKey, double colKey, double tableKey)
   }
 
   Value = Factor*(Tables[r-1].GetValue(rowKey, colKey) - Tables[r-2].GetValue(rowKey, colKey))
-                              + Tables[r-1].GetValue(rowKey, colKey);
+                              + Tables[r-2].GetValue(rowKey, colKey);
 
   return Value;
 }