diff --git a/simgear/structure/SGExpression.hxx b/simgear/structure/SGExpression.hxx index 6f90061c..ffb9dd1d 100644 --- a/simgear/structure/SGExpression.hxx +++ b/simgear/structure/SGExpression.hxx @@ -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::getNumOperands(); - for (unsigned i = 0; i < sz; ++i) + for (unsigned i = 1; i < sz; ++i) value -= getOperand(i)->getValue(b); } using SGNaryExpression::getValue;