Fix wrong difference calculation in SGExpression

This commit is contained in:
Torsten Dreyer 2011-01-25 22:58:50 +01:00
parent 840780dc4a
commit 6d2646239e

View File

@ -807,9 +807,9 @@ public:
{ }
virtual void eval(T& value, const simgear::expression::Binding* b) const
{
value = T(0);
value = getOperand(0)->getValue(b);
unsigned sz = SGNaryExpression<T>::getNumOperands();
for (unsigned i = 0; i < sz; ++i)
for (unsigned i = 1; i < sz; ++i)
value -= getOperand(i)->getValue(b);
}
using SGNaryExpression<T>::getValue;