about summary refs log tree commit diff
path: root/stdlib/strfrom-skeleton.c
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/strfrom-skeleton.c')
-rw-r--r--stdlib/strfrom-skeleton.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/stdlib/strfrom-skeleton.c b/stdlib/strfrom-skeleton.c
index 1fba04bf6a..36e9adcad5 100644
--- a/stdlib/strfrom-skeleton.c
+++ b/stdlib/strfrom-skeleton.c
@@ -27,6 +27,7 @@
 #include <printf.h>
 #include <string.h>
 #include <locale/localeinfo.h>
+#include <fix-float-double-convert-nan.h>
 
 #define UCHAR_T char
 #define L_(Str) Str
@@ -61,7 +62,7 @@ STRFROM (char *dest, size_t size, const char *format, FLOAT f)
      because __printf_fp and __printf_fphex only accept double and long double
      as the floating-point argument.  */
   if (__builtin_types_compatible_p (FLOAT, float))
-    fpnum.flt = f;
+    fpnum.flt = keep_sign_conversion (f);
   else
     fpnum.value = f;