]> git.mxchange.org Git - flightgear.git/commitdiff
Work around a potential never ending loop problem. A proper fix will be in the next...
authorehofman <ehofman>
Sun, 13 Jun 2004 18:44:21 +0000 (18:44 +0000)
committerehofman <ehofman>
Sun, 13 Jun 2004 18:44:21 +0000 (18:44 +0000)
src/FDM/JSBSim/filtersjb/FGKinemat.cpp

index a12a4711393109516ae61a0a0f23253743f33e62..feb5e5e8a24a4f878e899174d7e42b4146a7d132 100644 (file)
@@ -154,6 +154,8 @@ bool FGKinemat::Run(void )
       if (Detents[ind] < ThisInput)     ThisInput = Detents[ind];
       // Compute the time to reach the value in ThisInput
       double ThisDt = fabs((ThisInput-Output)/Rate);
+      if (ThisDt == 0.0)
+         break;
       // and clip to the timestep size
       if (dt < ThisDt) ThisDt = dt;
       dt -= ThisDt;