diff options
Diffstat (limited to 'archival/bz/huffman.c')
-rw-r--r-- | archival/bz/huffman.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/archival/bz/huffman.c b/archival/bz/huffman.c index 3f80c99..02838c4 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; } |