plug-ins: fix crash on export to xmc

Fixes #10605.

Export to xmc when image width or height is 256 pixels
causes a crash. Add equality check to an assert to stop
the plug-in from crashing.
This commit is contained in:
Anders Jonsson 2024-01-14 21:12:32 +01:00
parent bb588155fd
commit 9838c9f65f

View file

@ -1569,7 +1569,7 @@ save_image (GFile *file,
GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
/*convert pixel date to XcursorPixel. */
g_assert (save_rgn.width * save_rgn.height < SQR (MAX_SAVE_DIMENSION));
g_assert (save_rgn.width * save_rgn.height <= SQR (MAX_SAVE_DIMENSION));
for (j = 0; j < save_rgn.width * save_rgn.height; j++)
{
imagesp->images[i]->pixels[j] = premultiply_alpha (pixelbuf[j]);