mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #14179 from caoddx/fix-minimal-printf
Fix minimal-printf floating point decimal output errorpull/14239/head
commit
fb0d646f23
|
@ -302,6 +302,8 @@ static void mbed_minimal_formatted_string_double(char *buffer, size_t length, in
|
||||||
precision *= 10;
|
precision *= 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
value = (value - integer) * precision;
|
||||||
|
|
||||||
/* convert to positive number */
|
/* convert to positive number */
|
||||||
if (value < 0.0) {
|
if (value < 0.0) {
|
||||||
value *= -1.0;
|
value *= -1.0;
|
||||||
|
|
Loading…
Reference in New Issue