summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/openjp2/opj_intmath.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/openjp2/opj_intmath.h b/src/lib/openjp2/opj_intmath.h
index ad135976..754b5512 100644
--- a/src/lib/openjp2/opj_intmath.h
+++ b/src/lib/openjp2/opj_intmath.h
@@ -170,7 +170,7 @@ Divide an integer and round upwards
static INLINE OPJ_UINT32 opj_uint_ceildiv(OPJ_UINT32 a, OPJ_UINT32 b)
{
assert(b);
- return (a + b - 1) / b;
+ return (OPJ_UINT32)(((OPJ_UINT64)a + b - 1) / b);
}
/**