This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
hexfp: printf %.13a 1.0
[perl5.git] / sv.c
diff --git a/sv.c b/sv.c
index 53133b9..d080f1f 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -12449,8 +12449,8 @@ Perl_sv_vcatpvfn_flags(pTHX_ SV *const sv, const char *const pat, const STRLEN p
                     *p++ = xdig[*v++];
 
                     /* The radix is always output after the first
-                     * non-zero xdigit, or if alt.  */
-                    if (vfnz < vlnz || alt) {
+                     * non-zero xdigit, or if precis, or if alt.  */
+                    if (vfnz < vlnz || precis > 0 || alt) {
 #ifndef USE_LOCALE_NUMERIC
                         *p++ = '.';
 #else