Skip to content

Commit a3d51d5

Browse files
committed
Fix another instance of chr() with values outside [0, 255]
1 parent 615b065 commit a3d51d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/test/php/util/unittest/BytesTest.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ public function iteration() {
333333
$c= ['H', "\303", "\244", 'l', 'l', 'o'];
334334
$b= new Bytes($c);
335335
foreach ($b as $i => $byte) {
336-
Assert::equals($c[$i], chr($byte));
336+
Assert::equals($c[$i], chr($byte & 0xff));
337337
}
338338
Assert::equals($i, sizeof($c)- 1);
339339
}

0 commit comments

Comments
 (0)