Commit 706b998c authored by Christophe Gisquet's avatar Christophe Gisquet Committed by Diego Biurrun

ape: Use unsigned integer maths

This involves a division that should be a shift.
Signed-off-by: 's avatarDiego Biurrun <diego@biurrun.de>
parent cbc7d60a
......@@ -393,7 +393,7 @@ static inline int range_get_symbol(APEContext *ctx,
}
/** @} */ // group rangecoder
static inline void update_rice(APERice *rice, int x)
static inline void update_rice(APERice *rice, unsigned int x)
{
int lim = rice->k ? (1 << (rice->k + 4)) : 0;
rice->ksum += ((x + 1) / 2) - ((rice->ksum + 16) >> 5);
......@@ -406,7 +406,7 @@ static inline void update_rice(APERice *rice, int x)
static inline int ape_decode_value(APEContext *ctx, APERice *rice)
{
int x, overflow;
unsigned int x, overflow;
if (ctx->fileversion < 3990) {
int tmpk;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment