summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dransfeld <sd@tango.flipp.net>2014-10-28 09:55:40 +0100
committerSebastian Dransfeld <sd@tango.flipp.net>2014-10-31 12:59:50 +0100
commit53a5cbb47608adcdf574960b26eec8c3039df244 (patch)
treeb5476f93a13ad4cdc2cc4b21a8a82e1f461b573e
parent75a99f940a850dc6890155dabd141649fa86ee21 (diff)
downloadevas_generic_loaders-53a5cbb47608adcdf574960b26eec8c3039df244.tar.gz
xcf: Make sure complete calculation is unsigned
Fixes CID63748 and CID 63749 @fix
-rw-r--r--src/bin/xcf/pixelfuncs.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bin/xcf/pixelfuncs.c b/src/bin/xcf/pixelfuncs.c
index 7bb9300..f0c0754 100644
--- a/src/bin/xcf/pixelfuncs.c
+++ b/src/bin/xcf/pixelfuncs.c
@@ -308,7 +308,7 @@ combine_pixels_normal (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_w
unsigned char src_alpha;
unsigned char new_alpha;
float ratio, compl_ratio;
- long tmp;
+ unsigned long tmp;
_clip(&src_tl_x, &src_tl_y, &src_br_x, &src_br_y, &dest_x, &dest_y, dest_w, dest_h);
@@ -325,7 +325,7 @@ combine_pixels_normal (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_w
if (src_alpha == 255)
new_alpha = src_alpha;
else
- new_alpha = AD + INT_MULT((255 - AD), src_alpha, tmp);
+ new_alpha = AD + INT_MULT((255u - AD), src_alpha, tmp);
b = 3;
if (new_alpha != 0)
@@ -725,7 +725,7 @@ combine_pixels_diss (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_w,
unsigned char src_alpha;
unsigned char new_alpha;
float ratio, compl_ratio;
- long tmp;
+ unsigned long tmp;
src_alpha = AS;
@@ -734,7 +734,7 @@ combine_pixels_diss (DATA8* src, int src_w, int src_h, DATA8* dest, int dest_w,
if (src_alpha == 255)
new_alpha = src_alpha;
else
- new_alpha = AD + INT_MULT((255 - AD), src_alpha, tmp);
+ new_alpha = AD + INT_MULT((255u - AD), src_alpha, tmp);
b = 3;
if (new_alpha != 0)