--- a/src/miscallenous.cpp Sat Jan 28 13:32:55 2017 +0200 +++ b/src/miscallenous.cpp Sat Jan 28 13:49:09 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 < countof (factors)) + if (decimals >= 0 and decimals < length (factors)) a = round (a * factors[decimals]) / factors[decimals]; }