Skip to content

Commit

Permalink
Porting changes from charlesnicholson/nanoprintf#274
Browse files Browse the repository at this point in the history
  • Loading branch information
josesimoes committed Sep 16, 2024
1 parent 765eee7 commit f0c6aad
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/CLR/Helpers/nanoprintf/nanoprintf.h
Original file line number Diff line number Diff line change
Expand Up @@ -996,7 +996,10 @@ int npf_vpprintf(npf_putc pc, void *pc_ctx, char const *format, va_list args) {
if (fs.conv_spec != NPF_FMT_SPEC_CONV_STRING) {
#if NANOPRINTF_USE_FLOAT_FORMAT_SPECIFIERS == 1
// float precision is after the decimal point
if (fs.conv_spec != NPF_FMT_SPEC_CONV_FLOAT_DEC)
if ((fs.conv_spec != NPF_FMT_SPEC_CONV_FLOAT_DEC) &&
(fs.conv_spec != NPF_FMT_SPEC_CONV_FLOAT_SCI) &&
(fs.conv_spec != NPF_FMT_SPEC_CONV_FLOAT_SHORTEST) &&
(fs.conv_spec != NPF_FMT_SPEC_CONV_FLOAT_HEX))
#endif
{ prec_pad = npf_max(0, fs.prec - cbuf_len); }
}
Expand Down

0 comments on commit f0c6aad

Please sign in to comment.