aboutsummaryrefslogtreecommitdiff
path: root/archival/bz/huffman.c
diff options
context:
space:
mode:
Diffstat (limited to 'archival/bz/huffman.c')
-rw-r--r--archival/bz/huffman.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/archival/bz/huffman.c b/archival/bz/huffman.c
index 3f80c9976..02838c496 100644
--- a/archival/bz/huffman.c
+++ b/archival/bz/huffman.c
@@ -183,6 +183,8 @@ void BZ2_hbMakeCodeLengths(uint8_t *len,
183 183
184 for (i = 1; i <= alphaSize; i++) { 184 for (i = 1; i <= alphaSize; i++) {
185 j = weight[i] >> 8; 185 j = weight[i] >> 8;
186 /* bbox: yes, it is a signed division.
187 * don't replace with shift! */
186 j = 1 + (j / 2); 188 j = 1 + (j / 2);
187 weight[i] = j << 8; 189 weight[i] = j << 8;
188 } 190 }