Skip to content

Commit 0e01abe

Browse files
committed
try less breaking fix
1 parent 039637e commit 0e01abe

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

ext/gd/libgd/gd_interpolation.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2464,9 +2464,10 @@ int gdTransformAffineBoundingBox(gdRectPtr src, const double affine[6], gdRectPt
24642464
double twidth = ceil((max.x - min.x));
24652465
double theight = ceil(max.y - min.y);
24662466

2467-
if (twidth < (double)INT_MIN || twidth > (double)INT_MAX ||
2468-
theight < (double)INT_MIN || theight > (double)INT_MAX)
2469-
return GD_FALSE;
2467+
if (twidth < (double)INT_MIN || twidth > (double)INT_MAX)
2468+
twidth = 0.0;
2469+
if (theight < (double)INT_MIN || theight > (double)INT_MAX)
2470+
theight = 0.0;
24702471

24712472
bbox->x = (int) min.x;
24722473
bbox->y = (int) min.y;

0 commit comments

Comments
 (0)