summaryrefslogtreecommitdiffstats
path: root/newlib/libc/stdio/vfwprintf.c
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/stdio/vfwprintf.c')
-rw-r--r--newlib/libc/stdio/vfwprintf.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/newlib/libc/stdio/vfwprintf.c b/newlib/libc/stdio/vfwprintf.c
index f0179a014..4786ed6a9 100644
--- a/newlib/libc/stdio/vfwprintf.c
+++ b/newlib/libc/stdio/vfwprintf.c
@@ -970,6 +970,8 @@ reswitch: switch (ch) {
break;
}
if (isnan (_fpvalue)) {
+ if (signbit (_fpvalue))
+ sign = L'-';
if (ch <= L'G') /* 'A', 'E', 'F', or 'G' */
cp = L"NAN";
else
@@ -1001,6 +1003,8 @@ reswitch: switch (ch) {
break;
}
if (expt == 1) {
+ if (signbit (_fpvalue))
+ sign = L'-';
if (ch <= L'G') /* 'A', 'E', 'F', or 'G' */
cp = L"NAN";
else