From: Mathieu Malaterre Date: Fri, 14 Mar 2014 11:59:18 +0000 (+0000) Subject: [trunk] Apply final missing patch from sumatrapdf team: X-Git-Tag: version.2.0.1~4^2~25 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9d0bdf69e5b960ce817c4e63420468f3d542f296;p=openjpeg [trunk] Apply final missing patch from sumatrapdf team: http://bugs.ghostscript.com/show_bug.cgi?id=694893 Update issue 231 --- diff --git a/src/lib/openjp2/opj_intmath.h b/src/lib/openjp2/opj_intmath.h index 73d08a28..38edf3f5 100644 --- a/src/lib/openjp2/opj_intmath.h +++ b/src/lib/openjp2/opj_intmath.h @@ -119,7 +119,7 @@ Divide an integer by a power of 2 and round upwards @return Returns a divided by 2^b */ static INLINE OPJ_INT32 opj_int_ceildivpow2(OPJ_INT32 a, OPJ_INT32 b) { - return (a + (1 << b) - 1) >> b; + return (OPJ_INT32)((a + (OPJ_INT64)(1 << b) - 1) >> b); } /** Divide an integer by a power of 2 and round downwards