diff --git a/simgear/math/SGMatrix.hxx b/simgear/math/SGMatrix.hxx index c796c336..8b9756cf 100644 --- a/simgear/math/SGMatrix.hxx +++ b/simgear/math/SGMatrix.hxx @@ -300,7 +300,7 @@ inline SGMatrix operator-(SGMatrix m) { - for (unsigned i = 0; i < SGMatrix::nRows; ++i) + for (unsigned i = 0; i < SGMatrix::nEnts; ++i) m[i] = -m[i]; return m; }