diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2000-08-18 03:15:35 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-08-18 03:15:35 +0000 |
commit | ad66e0ebddf4284c422b779bd6dd8b67482795b8 (patch) | |
tree | d12dd78838353a361be4c1862449475742a10f32 /configpm | |
parent | 0199fce9e831d70af0aeef6c5962dc695c3c246f (diff) | |
download | perl-ad66e0ebddf4284c422b779bd6dd8b67482795b8.tar.gz |
The byteorder code in #6671 was wrong.
p4raw-id: //depot/perl@6688
Diffstat (limited to 'configpm')
-rwxr-xr-x | configpm | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -134,8 +134,10 @@ sub FETCH { my $t = $Config{ivtype}; my $s = $Config{ivsize}; my $f = $t eq 'long' ? 'L!' : $s == 8 ? 'Q': 'I'; - my $i = unpack($f, pack('C*', map { ord() } 1..$s)); if ($s == 4 || $s == 8) { + my $i = 0; + foreach my $c (reverse(2..$s)) { $i |= ord($c); $i <<= 8 } + $i |= ord(1); $value = join('', unpack('a'x$s, pack($f, $i))); } else { $value = '?'x$s; |