coders/wpg.c: Wrong row count checking.
authorfojtik
Mon, 06 Nov 2017 00:27:28 +0100
changeset 15251 1b9e64a8901e
parent 15250 2a21cda3145b
child 15252 23cca396bcb5
coders/wpg.c: Wrong row count checking.
coders/wpg.c
--- a/coders/wpg.c	Sun Nov 05 22:22:11 2017 +0100
+++ b/coders/wpg.c	Mon Nov 06 00:27:28 2017 +0100
@@ -603,7 +603,7 @@
             /* duplicate the previous row RunCount x */
             for(i=0;i<=RunCount;i++)
               {      
-                if(InsertRow(UpImgBuff,(long)(image->rows >= y ? y : image->rows-1),image,bpp) == MagickFail)
+                if(InsertRow(UpImgBuff,(long)((image->rows>y) ? y : image->rows-1),image,bpp) == MagickFail)
                   {
                     FreeUnpackWPG2RasterAllocs(BImgBuff,UpImgBuff);
                     return(-4);