Commit 003fa104 authored by Martin Storsjö's avatar Martin Storsjö

msac: Add a cast to indicate intended narrowing from size_t to unsigned

This fixes this compiler warning with MSVC:
../src/msac.c(148): warning C4267: '+=': conversion from 'size_t' to 'unsigned int', possible loss of data
parent fa1b2651
Pipeline #6325 passed with stages
in 7 minutes and 37 seconds
......@@ -145,7 +145,7 @@ static unsigned decode_symbol(MsacContext *const s, const uint16_t *const cdf,
u = v;
v = r * (cdf[ret++] >> EC_PROB_SHIFT);
v >>= 7 - EC_PROB_SHIFT;
v += EC_MIN_PROB * (n_symbols - ret);
v += EC_MIN_PROB * (int) (n_symbols - ret);
} while (c < v);
assert(u <= s->rng);
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