diff options
author | Glenn Randers-Pehrson <glennrp at users.sourceforge.net> | 2015-07-01 14:06:39 -0500 |
---|---|---|
committer | Glenn Randers-Pehrson <glennrp at users.sourceforge.net> | 2015-07-01 14:06:39 -0500 |
commit | a390897ba4aae8c63df4b88834b6835a0fa02c9c (patch) | |
tree | 10242b3402f10b78212308daa8eb8005945447b9 /pngrtran.c | |
parent | 4e5ac72254aa9028670e4d1204a2b1021a83c9e2 (diff) |
[libpng16] Fixed a new signed-unsigned comparison in pngrtran.c (Max Stepin).
Removed some useless typecasts from contrib/tools/png-fix-itxt.c
Diffstat (limited to 'pngrtran.c')
-rw-r--r-- | pngrtran.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pngrtran.c b/pngrtran.c index 0720f804c..0de48e7b1 100644 --- a/pngrtran.c +++ b/pngrtran.c @@ -4460,7 +4460,7 @@ png_do_expand(png_row_infop row_info, png_bytep row, for (i = 0; i < row_width; i++) { - if ((*sp & 0xff) == gray) + if ((*sp & 0xffU) == gray) *dp-- = 0; else @@ -4478,8 +4478,8 @@ png_do_expand(png_row_infop row_info, png_bytep row, dp = row + (row_info->rowbytes << 1) - 1; for (i = 0; i < row_width; i++) { - if ((*(sp - 1) & 0xff) == gray_high && - (*(sp) & 0xff) == gray_low) + if ((*(sp - 1) & 0xffU) == gray_high && + (*(sp) & 0xffU) == gray_low) { *dp-- = 0; *dp-- = 0; |