diff --git a/ext/gd/libgd/gd_interpolation.c b/ext/gd/libgd/gd_interpolation.c index 1c151b55090..4446ec772be 100644 --- a/ext/gd/libgd/gd_interpolation.c +++ b/ext/gd/libgd/gd_interpolation.c @@ -1783,8 +1783,8 @@ gdImagePtr gdImageRotateGeneric(gdImagePtr src, const float degrees, const int b const gdFixed f_slop_y = f_sin; const gdFixed f_slop_x = f_cos; - const gdFixed f_slop = f_slop_x > 0 && f_slop_x > 0 ? - f_slop_x > f_slop_y ? gd_divfx(f_slop_y, f_slop_x) : gd_divfx(f_slop_x, f_slop_y) + const gdFixed f_slop = f_slop_x > 0 && f_slop_y > 0 ? + (f_slop_x > f_slop_y ? gd_divfx(f_slop_y, f_slop_x) : gd_divfx(f_slop_x, f_slop_y)) : 0;