diff --git a/src/rp2_common/pico_printf/printf.c b/src/rp2_common/pico_printf/printf.c index 69655e9..b8f3cb1 100644 --- a/src/rp2_common/pico_printf/printf.c +++ b/src/rp2_common/pico_printf/printf.c @@ -510,7 +510,6 @@ static size_t _etoa(out_fct_type out, char *buffer, size_t idx, size_t maxlen, d } } else { expval = 0; - conv.F = 1; } // the exponent format is "%+03d" and largest value is "307", so set aside 4-5 characters @@ -519,7 +518,7 @@ static size_t _etoa(out_fct_type out, char *buffer, size_t idx, size_t maxlen, d // in "%g" mode, "prec" is the number of *significant figures* not decimals if (flags & FLAGS_ADAPT_EXP) { // do we want to fall-back to "%f" mode? - if ((value == 0.0) || ((value >= 1e-4) && (value < 1e6))) { + if ((conv.U == 0) || ((value >= 1e-4) && (value < 1e6))) { if ((int) prec > expval) { prec = (unsigned) ((int) prec - expval - 1); } else {