This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
80-bit big-endian extraction was also wrong.
authorJarkko Hietaniemi <jhi@iki.fi>
Fri, 15 Aug 2014 11:47:49 +0000 (07:47 -0400)
committerJarkko Hietaniemi <jhi@iki.fi>
Fri, 15 Aug 2014 11:47:49 +0000 (07:47 -0400)
Not that this format probably ever happens.

sv.c

diff --git a/sv.c b/sv.c
index f85685c..aacc3e4 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -11630,9 +11630,9 @@ Perl_sv_vcatpvfn_flags(pTHX_ SV *const sv, const char *const pat, const STRLEN p
                         *v++ = nvp[ix] & 0xF;
                     }
 #  elif LONG_DOUBLEKIND == LONG_DOUBLE_IS_X86_80_BIT_BIG_ENDIAN
-                    /* The last 10 bytes are the mantissa/fraction.
+                    /* The last 8 bytes are the mantissa/fraction.
                      * (does this format ever happen?) */
-                    for (ix = LONGDBLSIZE - 10; ix < LONGDBLSIZE; ix++) {
+                    for (ix = LONGDBLSIZE - 8; ix < LONGDBLSIZE; ix++) {
                         *v++ = nvp[ix] >> 4;
                         *v++ = nvp[ix] & 0xF;
                     }