diff --git a/source/nanoFramework.CoreLibrary/System/Number.cs b/source/nanoFramework.CoreLibrary/System/Number.cs index 07eb39f2..4a21cdd5 100644 --- a/source/nanoFramework.CoreLibrary/System/Number.cs +++ b/source/nanoFramework.CoreLibrary/System/Number.cs @@ -436,7 +436,7 @@ private static String AppendFloatTrailingZeros(String original, int count, Numbe if (pos != -1) { // is the string representation missing any trailing zeros? - count = (original.Length - pos) - 1; + count = (original.Length - pos) - count - 1; if(count > 0) { return original + new String('0', count);