diff options
Diffstat (limited to 'newlib/libc/stdio/vfprintf.c')
-rw-r--r-- | newlib/libc/stdio/vfprintf.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/newlib/libc/stdio/vfprintf.c b/newlib/libc/stdio/vfprintf.c index ed92bb2f9..3585423af 100644 --- a/newlib/libc/stdio/vfprintf.c +++ b/newlib/libc/stdio/vfprintf.c @@ -1245,6 +1245,8 @@ reswitch: switch (ch) { break; } if (isnan (_fpvalue)) { + if (signbit (_fpvalue)) + sign = '-'; if (ch <= 'G') /* 'A', 'E', 'F', or 'G' */ cp = "NAN"; else @@ -1276,6 +1278,8 @@ reswitch: switch (ch) { break; } if (expt == 1) { + if (signbit (_fpvalue)) + sign = '-'; if (ch <= 'G') /* 'A', 'E', 'F', or 'G' */ cp = "NAN"; else |