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,
for (i = 1; i <= alphaSize; i++) {
j = weight[i] >> 8;
+ /* bbox: yes, it is a signed division.
+ * don't replace with shift! */
j = 1 + (j / 2);
weight[i] = j << 8;
}