This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
hexfp: printf %a for negative zero.
[perl5.git] / sv.c
diff --git a/sv.c b/sv.c
index 8fad8be..53133b9 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -12363,7 +12363,9 @@ Perl_sv_vcatpvfn_flags(pTHX_ SV *const sv, const char *const pat, const STRLEN p
 #  endif
 #endif
 
-                if (fv < 0)
+                if (fv < 0
+                    || Perl_signbit(fv)
+                  )
                     *p++ = '-';
                 else if (plus)
                     *p++ = plus;