diff -r 4c7a353cf583 -r c8ecddbd99e9 src/miscallenous.cpp --- a/src/miscallenous.cpp Sat Jan 28 14:13:01 2017 +0200 +++ b/src/miscallenous.cpp Sat Jan 28 14:14:28 2017 +0200 @@ -61,7 +61,7 @@ void roundToDecimals (double& a, int decimals) { static const double factors[] = { 1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9 }; - if (decimals >= 0 and decimals < length (factors)) + if (decimals >= 0 and decimals < countof(factors)) a = round (a * factors[decimals]) / factors[decimals]; }