mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-19 12:59:21 +08:00
dda1874380
https://cygwin.com/pipermail/cygwin/2021-November/249930.html reported a regression introduce by using a dynamically sized local char array in favor of a statically sized array. Fix this by reverting to a statically sized array, using a small buffer on the stack for a reasonable number of requested digits, a big mallocated buffer otherwise. This should work for small targets as well, given that malloc is used in printf anyway right now. This is *still* hopefully just a temporary measure, unless somebody actually provides a new ldtoa. Fixes: 4d90e53359145 ("ldtoa: fix dropping too many digits from output") Signed-off-by: Corinna Vinschen <corinna@vinschen.de>