From 8a95efcd3fa19d95fee9888acd44d7396711fead Mon Sep 17 00:00:00 2001 From: mayeut Date: Sun, 23 Aug 2015 11:43:38 +0200 Subject: Fix some UBSan warnings --- src/bin/common/color.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/bin/common') diff --git a/src/bin/common/color.c b/src/bin/common/color.c index d662f995..98a4cec8 100644 --- a/src/bin/common/color.c +++ b/src/bin/common/color.c @@ -742,7 +742,7 @@ void color_esycc_to_rgb(opj_image_t *image) int y, cb, cr, sign1, sign2, val; unsigned int w, h, max, i; int flip_value = (1 << (image->comps[0].prec-1)); - int max_value = (~(-1 << image->comps[0].prec)); + int max_value = (1 << image->comps[0].prec) - 1; if(image->numcomps < 3) return; -- cgit v1.2.3