mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-30 02:50:25 +08:00
efaef1bba2
Don't over-read memory returned by _DTOA_R, and never write to it since the result might be a string literal. For example, when doing: swprintf(tt, 20, L"%.*f", 6, 0.0); we will get back "0". Instead, write the result returned by _DTOA_R to the output buffer. After this, write the 0 chars directly to the the output buffer (if there are any). This also has the (marginal) advantage that we read/write less memory overall.