X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fstructure%2FSGExpression.hxx;h=ffb9dd1ded2408b43797160ab597e6820cb0fa9f;hb=c955e61ba785a7b4699ed0a35f947fb661cab854;hp=6f90061c32e6b97ba1249c088656f4dc5219bdcd;hpb=1670f88e54fcb7842913f874f0f308f551df102f;p=simgear.git 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;