Skip to content

Commit 19781e2

Browse files
committed
update dependencies
1 parent a9de5c1 commit 19781e2

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.0.41
1+
2.0.42

src/Type/AsciiEightFive.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public function decode(string $data): string
9292
// the value represented by a group of 5 characters should never be greater than 2^32 - 1
9393
$tuple += (($char - 33) * $pow85[$group_pos]);
9494
if ($group_pos == 4) {
95-
$decoded .= \chr($tuple >> 24) . \chr($tuple >> 16) . \chr($tuple >> 8) . \chr($tuple);
95+
$decoded .= \chr(($tuple >> 24) & 0xFF) . \chr(($tuple >> 16) & 0xFF) . \chr(($tuple >> 8) & 0xFF) . \chr($tuple & 0xFF);
9696
$tuple = 0;
9797
$group_pos = 0;
9898
} else {
@@ -117,9 +117,9 @@ protected function getLastTuple(int $group_pos, int $tuple): string
117117
{
118118
// last tuple (if any)
119119
return match ($group_pos) {
120-
4 => \chr($tuple >> 24) . \chr($tuple >> 16) . \chr($tuple >> 8),
121-
3 => \chr($tuple >> 24) . \chr($tuple >> 16),
122-
2 => \chr($tuple >> 24),
120+
4 => \chr(($tuple >> 24) & 0xFF) . \chr(($tuple >> 16) & 0xFF) . \chr(($tuple >> 8) & 0xFF),
121+
3 => \chr(($tuple >> 24) & 0xFF) . \chr(($tuple >> 16) & 0xFF),
122+
2 => \chr(($tuple >> 24) & 0xFF),
123123
1 => throw new PPException('invalid code'),
124124
default => '',
125125
};

0 commit comments

Comments
 (0)