Skip to content

Commit f267feb

Browse files
committed
try with floats
1 parent 1bcfc83 commit f267feb

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

ext/gd/tests/gh16322.phpt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@ GH-16322 (imageaffine overflow/underflow on affine matrix)
44
gd
55
--INI--
66
memory_limit=-1
7-
--SKIPIF--
8-
<?php if (PHP_INT_SIZE != 8) die('skip this test is for 64bit platforms only'); ?>
97
--FILE--
108
<?php
11-
$matrix = [PHP_INT_MAX, 1, 1, 1, 1, 1];
9+
$matrix = [1000000000.0, 1, 1, 1, 1, 1];
1210
$src = imagecreatetruecolor(8, 8);
1311

1412
try {
@@ -17,7 +15,7 @@ try {
1715
echo $e->getMessage() . PHP_EOL;
1816
}
1917
$matrix[0] = 1;
20-
$matrix[3] = PHP_INT_MIN;
18+
$matrix[3] = -9223372036854775809.0;
2119
try {
2220
imageaffine($src, $matrix);
2321
} catch (\ValueError $e) {

0 commit comments

Comments
 (0)