[gs-commits] rev 10960 - branches/icc_work/base

mvrhel at ghostscript.com mvrhel at ghostscript.com
Wed Mar 24 01:57:58 UTC 2010


Author: mvrhel
Date: 2010-03-24 01:57:57 +0000 (Wed, 24 Mar 2010)
New Revision: 10960

Modified:
   branches/icc_work/base/gsicc.c
Log:
Fix for unsigned short casting during subtraction

Modified: branches/icc_work/base/gsicc.c
===================================================================
--- branches/icc_work/base/gsicc.c	2010-03-24 00:10:27 UTC (rev 10959)
+++ branches/icc_work/base/gsicc.c	2010-03-24 01:57:57 UTC (rev 10960)
@@ -125,7 +125,7 @@
     /* Interpolate 1/2 value in des space and compare */
     for (k = 0; k < ndes; k++) {
         interp_des = (des0[k] + des1[k]) >> 1;
-        if (any_abs(interp_des - des01[k]) > max_diff)
+        if (any_abs((signed int) interp_des - (signed int) des01[k]) > max_diff)
             return false;
     }
     return 1;
@@ -181,17 +181,17 @@
     /* Interpolate in des space and check it */
     for (k = 0; k < ndes; k++){
         interp_des = (des0[k] + des1[k]) >> 1;
-        if (any_abs(interp_des - des01[k]) > max_diff)
+        if (any_abs((signed int) interp_des - (signed int) des01[k]) > max_diff)
             return false;
         interp_des = (des0[k] + des2[k]) >> 1;
-        if (any_abs(interp_des - des02[k]) > max_diff)
+        if (any_abs((signed int) interp_des - (signed int) des02[k]) > max_diff)
             return false;
         interp_des = (des1[k] + des2[k]) >> 1;
-        if (any_abs(interp_des - des12[k]) > max_diff)
+        if (any_abs((signed int) interp_des - (signed int) des12[k]) > max_diff)
             return false;
         /* 12 with 0 */
         interp_des = (des0[k] + interp_des) >> 1;
-        if (any_abs(interp_des - des012[k]) > max_diff)
+        if (any_abs((signed int) interp_des - (signed int) des012[k]) > max_diff)
             return false;
     }
     return 1;



More information about the gs-commits mailing list