Skip to content

Commit f0c6aad

Browse files
committed
Porting changes from charlesnicholson/nanoprintf#274
1 parent 765eee7 commit f0c6aad

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/CLR/Helpers/nanoprintf/nanoprintf.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -996,7 +996,10 @@ int npf_vpprintf(npf_putc pc, void *pc_ctx, char const *format, va_list args) {
996996
if (fs.conv_spec != NPF_FMT_SPEC_CONV_STRING) {
997997
#if NANOPRINTF_USE_FLOAT_FORMAT_SPECIFIERS == 1
998998
// float precision is after the decimal point
999-
if (fs.conv_spec != NPF_FMT_SPEC_CONV_FLOAT_DEC)
999+
if ((fs.conv_spec != NPF_FMT_SPEC_CONV_FLOAT_DEC) &&
1000+
(fs.conv_spec != NPF_FMT_SPEC_CONV_FLOAT_SCI) &&
1001+
(fs.conv_spec != NPF_FMT_SPEC_CONV_FLOAT_SHORTEST) &&
1002+
(fs.conv_spec != NPF_FMT_SPEC_CONV_FLOAT_HEX))
10001003
#endif
10011004
{ prec_pad = npf_max(0, fs.prec - cbuf_len); }
10021005
}

0 commit comments

Comments
 (0)