This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix copy-and-paste mistake in U8TO64_LE
authorMatt Turner <mattst88@gmail.com>
Mon, 4 Nov 2019 00:13:48 +0000 (16:13 -0800)
committerTony Cook <tony@develop-help.com>
Mon, 4 Nov 2019 02:02:59 +0000 (03:02 +0100)
Fixes: https://github.com/Perl/perl5/issues/17244
Fixes: https://github.com/Perl/perl5/issues/17247
Fixes: https://rt.cpan.org/Ticket/Display.html?id=130890

hv_macro.h

index 02c0baa..b96057e 100644 (file)
@@ -25,7 +25,7 @@
     #define U8TO16_LE(ptr)   ((U32)(ptr)[1]|(U32)(ptr)[0]<<8)
     #define U8TO32_LE(ptr)   ((U32)(ptr)[3]|(U32)(ptr)[2]<<8|(U32)(ptr)[1]<<16|(U32)(ptr)[0]<<24)
     #define U8TO64_LE(ptr)   ((U64)(ptr)[7]|(U64)(ptr)[6]<<8|(U64)(ptr)[5]<<16|(U64)(ptr)[4]<<24|\
-                              (U64)(ptr)[3]<<32|(U64)(ptr)[4]<<40|\
+                              (U64)(ptr)[3]<<32|(U64)(ptr)[2]<<40|\
                               (U64)(ptr)[1]<<48|(U64)(ptr)[0]<<56)
   #elif (BYTEORDER == 0x4321 || BYTEORDER == 0x87654321)
     #define U8TO16_LE(ptr)   ((U32)(ptr)[0]|(U32)(ptr)[1]<<8)