aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2018-01-16 09:31:17 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2018-01-16 09:31:17 +0000
commit3cd20fa5c748e449974207eb9c139df34a34e10a (patch)
treecd5a9eac2dc398c01b071512cab8e6976b667dcd /os/hal
parentc8a29d8802f436115664cc640faa8389cb4beb19 (diff)
downloadChibiOS-3cd20fa5c748e449974207eb9c139df34a34e10a.tar.gz
ChibiOS-3cd20fa5c748e449974207eb9c139df34a34e10a.tar.bz2
ChibiOS-3cd20fa5c748e449974207eb9c139df34a34e10a.zip
Fixed bug #910.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11291 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal')
-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')