]> granicus.if.org Git - openjpeg/commitdiff
[trunk] Apply final missing patch from sumatrapdf team:
authorMathieu Malaterre <mathieu.malaterre@gmail.com>
Fri, 14 Mar 2014 11:59:18 +0000 (11:59 +0000)
committerMathieu Malaterre <mathieu.malaterre@gmail.com>
Fri, 14 Mar 2014 11:59:18 +0000 (11:59 +0000)
http://bugs.ghostscript.com/show_bug.cgi?id=694893
Update issue 231

src/lib/openjp2/opj_intmath.h

index 73d08a28e572cc809959674afc7c12da1bb9d793..38edf3f50c17cd7f378d7cc735e4f54bbb435f73 100644 (file)
@@ -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