summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert Everson <robert@reverson.net>2018-08-27 15:28:53 -0700
committerRobert Everson <robert@reverson.net>2018-08-27 15:28:53 -0700
commit0fa7ebe2540990f590c2247b3505ac1dc84b6eec (patch)
tree9031ff47b8bbedf2d720deb899a12b2364c75196 /src
parent9d1a9dc20dd5155bab977a4f53d05c4bbd66533a (diff)
Cast on uint ceildiv
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);
}
/**