[libpng16] Use unsigned hex constants in "reciprocal" computations

This commit is contained in:
Glenn Randers-Pehrson
2015-08-17 12:40:19 -05:00
parent d8b93c29a7
commit 268c7bf68b
2 changed files with 4 additions and 4 deletions

View File

@@ -88,7 +88,7 @@ png_get_int_32)(png_const_bytep buf)
if ((uval & 0x80000000UL) == 0) /* non-negative */
return uval;
uval = (uval ^ 0xffffffffUL) + 1; /* 2's complement: -x = ~x+1 */
uval = (uval ^ (png_uint_32)0xffffffffUL) + 1; /* 2's complement: -x = ~x+1 */
return -(png_int_32)uval;
}