Merge pull request #1136 from reverson/master

Cast on uint ceildiv
This commit is contained in:
Even Rouault 2018-09-22 22:59:36 +02:00 committed by GitHub
commit 5d94bcd89c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -170,7 +170,7 @@ Divide an integer and round upwards
static INLINE OPJ_UINT32 opj_uint_ceildiv(OPJ_UINT32 a, OPJ_UINT32 b) static INLINE OPJ_UINT32 opj_uint_ceildiv(OPJ_UINT32 a, OPJ_UINT32 b)
{ {
assert(b); assert(b);
return (a + b - 1) / b; return (OPJ_UINT32)(((OPJ_UINT64)a + b - 1) / b);
} }
/** /**