prinf: fix printing 1.0

This commit is contained in:
King Kévin 2018-01-24 16:34:24 +01:00
parent 5d472aacbe
commit b6419954f7
1 changed files with 1 additions and 1 deletions

View File

@ -167,7 +167,7 @@ static size_t print_float(char** str, size_t* size, double f, uint32_t padding,
exponent -= padding;
}
} else {
while (f_abs>pow(10.0, exponent)) { // find the positive exponent, base 10
while (f_abs>=pow(10.0, exponent)) { // find the positive exponent, base 10
exponent += 3; // increment in kilo
}
if (padding) { // respect padding wish