Skip to content

Commit fdf1cf4

Browse files
committed
fix user-implementation endian
1 parent 20b7215 commit fdf1cf4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ext/random/tests/engine/user_xorshift128plus.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class XorShift128Plus
5656
$s1 ^= $s1 << 23;
5757
$this->s1 = $s1 ^ $s0 ^ (($s1 >> 18) & self::MASK_S18) ^ (($s0 >> 5) & self::MASK_S5);
5858

59-
return \pack('q*', $z);
59+
return \pack('P*', $z);
6060
}
6161

6262
protected function splitmix64(int &$s): int

ext/random/tests/engine/user_xoshiro128plusplus.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ final class Xoshiro128PP implements \Random\Engine
4242

4343
$this->s3 = self::rotl($this->s3, 11);
4444

45-
return \pack('L', $result);
45+
return \pack('V', $result);
4646
}
4747
}
4848

0 commit comments

Comments
 (0)