diff options
Diffstat (limited to 'CPP/7zip/Compress/QuantumDecoder.cpp')
-rw-r--r-- | CPP/7zip/Compress/QuantumDecoder.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/CPP/7zip/Compress/QuantumDecoder.cpp b/CPP/7zip/Compress/QuantumDecoder.cpp index 64e35bf2..8c650581 100644 --- a/CPP/7zip/Compress/QuantumDecoder.cpp +++ b/CPP/7zip/Compress/QuantumDecoder.cpp @@ -41,7 +41,7 @@ unsigned CModelDecoder::Decode(CRangeDecoder *rc) unsigned res = Vals[--i]; do - Freqs[i] += kUpdateStep; + Freqs[i] = (UInt16)(Freqs[i] + kUpdateStep); while (i--); if (Freqs[0] > kFreqSumMax) @@ -72,7 +72,7 @@ unsigned CModelDecoder::Decode(CRangeDecoder *rc) i = NumItems - 1; do { - Freqs[i] >>= 1; + Freqs[i] = (UInt16)(Freqs[i] >> 1); if (Freqs[i] <= Freqs[(size_t)i + 1]) Freqs[i] = (UInt16)(Freqs[(size_t)i + 1] + 1); } |