Files
ardupilot/libraries/AP_HAL/utility
Thomas WatsonandJasonMDavey f7cde8bf59 AP_HAL: fix ftoa_engine hang with very small floats
Subnormal floats with mantissas of 7 or less (14 before the previous
fix) have less digits to format than the conversion loop expects,
causing it to never meet the condition to exit and looping forever. This
cannot occur with normal floats because the implicit leading 1 always
produces a sufficiently large value to format.

This causes a hang with the 12 floats closest to zero (26 before the
previous fix) if a suitably large precision is passed (which it is by
default using e.g. `%f`). Fix by exiting the conversion loop if we get
in the case where we can't add any more digits.

Co-authored-by: JasonMDavey <65718912+JasonMDavey@users.noreply.github.com>
2025-07-29 16:35:03 +09:00
..
…
…
…
…
…
…
…
…
…
…
…
…