summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Ignacio Marín <jima00@gmail.com>2017-03-03 18:26:11 (GMT)
committerJosé Ignacio Marín <jima00@gmail.com>2017-03-03 18:26:11 (GMT)
commit9439bbc72e66a54de76674374faf70c629eda920 (patch)
tree03b280016f8975b026aaf9ec2f715ed812ec13a3
parent4050013c1861b023bdea1f636d058f4898bbe5e3 (diff)
downloadtk-9439bbc72e66a54de76674374faf70c629eda920.zip
tk-9439bbc72e66a54de76674374faf70c629eda920.tar.gz
tk-9439bbc72e66a54de76674374faf70c629eda920.tar.bz2
Patch on behalf of TheLemonMan that addresses bug [6b3644a4858f018cd08615d3d516b07d271fe2a].
-rw-r--r--generic/tkImgPNG.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tkImgPNG.c b/generic/tkImgPNG.c
index c6e3029..6e64afa 100644
--- a/generic/tkImgPNG.c
+++ b/generic/tkImgPNG.c
@@ -2245,10 +2245,10 @@ ApplyAlpha(
p += offset;
if (16 == pngPtr->bitDepth) {
- register int channel;
+ register unsigned int channel;
while (p < endPtr) {
- channel = (unsigned char)
+ channel = (unsigned int)
(((p[0] << 8) | p[1]) * pngPtr->alpha);
*p++ = (unsigned char) (channel >> 8);