From: frohlich Date: Sat, 23 May 2009 12:02:23 +0000 (+0000) Subject: Avoid division by zero. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=8a6bad9c59f70a666df3d951deb20715585a1cce;p=flightgear.git Avoid division by zero. Modified Files: src/Instrumentation/inst_vertical_speed_indicator.cxx --- diff --git a/src/Instrumentation/inst_vertical_speed_indicator.cxx b/src/Instrumentation/inst_vertical_speed_indicator.cxx index fd339b481..0237a6ded 100644 --- a/src/Instrumentation/inst_vertical_speed_indicator.cxx +++ b/src/Instrumentation/inst_vertical_speed_indicator.cxx @@ -20,6 +20,7 @@ // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // +#include #include #include "inst_vertical_speed_indicator.hxx" @@ -191,7 +192,7 @@ void InstVerticalSpeedIndicator::update (double dt) if (_serviceable_node->getBoolValue()) { // avoids hang, when freeze - if( !_freeze_node->getBoolValue() ) + if( !_freeze_node->getBoolValue() && std::numeric_limits::min() < fabs(dt)) { double pressure_inhg = _pressure_node->getDoubleValue(); double sea_inhg = _sea_node->getDoubleValue();