aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/lib/streams/chprintf.c
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/lib/streams/chprintf.c')
-rw-r--r--os/hal/lib/streams/chprintf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/os/hal/lib/streams/chprintf.c b/os/hal/lib/streams/chprintf.c
index 5875d3e8a..737d01341 100644
--- a/os/hal/lib/streams/chprintf.c
+++ b/os/hal/lib/streams/chprintf.c
@@ -163,8 +163,9 @@ int chvprintf(BaseSequentialStream *chp, const char *fmt, va_list ap) {
break;
width = width * 10 + c;
}
- precision = 0;
+ precision = 6;
if (c == '.') {
+ precision = 0;
while (TRUE) {
c = *fmt++;
if (c >= '0' && c <= '9')