summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);