Tighten std/bzip2 huffman_trees array size

This commit is contained in:
Nigel Tao committed 2022-06-10 14:02:17 +10:00
1 parent 5d7b113172
commit 8c33dd503b
9 files changed
+137 -30

No files matched your search

+1 -1
View File
@@ -59,7 +59,7 @@ pri func decoder.decode_huffman_fast!(src: base.io_reader) base.status {
bits ~mod<<= table_entry >> 12
n_bits -= (table_entry >> 12) as base.u32
child = table_entry & 0x7FF
while child < 1024 {
while child < 257 {
child = this.huffman_trees[which][child][bits >> 31]
bits ~mod<<= 1
if n_bits <= 0 {