提交 706b998c 编写于 作者: C Christophe Gisquet 提交者: Diego Biurrun

ape: Use unsigned integer maths

This involves a division that should be a shift.
Signed-off-by: NDiego Biurrun <diego@biurrun.de>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册