Browse Source

libvsprintf: fixed handling of "%f" to print precision 6

sbg
Andrew Tridgell 12 years ago
parent
commit
953acbe650
  1. 5
      nuttx/libc/stdio/lib_libvsprintf.c

5
nuttx/libc/stdio/lib_libvsprintf.c

@ -1215,7 +1215,7 @@ int lib_vsprintf(FAR struct lib_outstream_s *obj, FAR const char *src, va_list a @@ -1215,7 +1215,7 @@ int lib_vsprintf(FAR struct lib_outstream_s *obj, FAR const char *src, va_list a
fmt = FMT_RJUST;
width = 0;
#ifdef CONFIG_LIBC_FLOATINGPOINT
trunc = 0;
trunc = 6;
#endif
#endif
@ -1245,6 +1245,9 @@ int lib_vsprintf(FAR struct lib_outstream_s *obj, FAR const char *src, va_list a @@ -1245,6 +1245,9 @@ int lib_vsprintf(FAR struct lib_outstream_s *obj, FAR const char *src, va_list a
{
#ifndef CONFIG_NOPRINTF_FIELDWIDTH
fmt = FMT_RJUST0;
if (IS_HASDOT(flags)) {
trunc = 0;
}
#endif
}
#if 0

Loading…
Cancel
Save