Update to libtiff-4.0.6 (#764)
[openjpeg.git] / thirdparty / libtiff / tif_fax3.c
index 2b2dccd08ee337bfa3d4ca6e9a1e27cf909951d4..bbe72555bee33318396b54d9d7f1e741f92d2a48 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: tif_fax3.c,v 1.74 2012-06-21 02:01:31 fwarmerdam Exp $ */
+/* $Id: tif_fax3.c,v 1.75 2015-08-30 20:49:55 erouault Exp $ */
 
 /*
  * Copyright (c) 1990-1997 Sam Leffler
@@ -442,8 +442,9 @@ _TIFFFax3fillruns(unsigned char* buf, uint32* runs, uint32* erun, uint32 lastx)
                        FILL(n, cp);
                        run &= 7;
                    }
+                    /* Explicit 0xff masking to make icc -check=conversions happy */
                    if (run)
-                       cp[0] |= 0xff00 >> run;
+                       cp[0] = (unsigned char)((cp[0] | (0xff00 >> run))&0xff);
                } else
                    cp[0] |= _fillmasks[run]>>bx;
                x += runs[1];