Print sign of NaN values to nano-vfprintf.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
Kumar Gala 2018-07-12 13:13:53 -05:00 committed by Corinna Vinschen
parent ab640f4cd5
commit 6d7e0b337c
1 changed files with 2 additions and 0 deletions

View File

@ -213,6 +213,8 @@ _printf_float (struct _reent *data,
} }
if (isnan (_fpvalue)) if (isnan (_fpvalue))
{ {
if (_fpvalue < 0)
pdata->l_buf[0] = '-';
if (code <= 'G') /* 'A', 'E', 'F', or 'G'. */ if (code <= 'G') /* 'A', 'E', 'F', or 'G'. */
cp = "NAN"; cp = "NAN";
else else