From: Steinar H. Gunderson Date: Sat, 3 Jan 2009 12:43:29 +0000 (+0100) Subject: Fix a bug in the fast Huffman decoder. X-Git-Url: https://git.sesse.net/?p=fjl;a=commitdiff_plain;h=18fc98f61929b7832ae43e3072fb20a9adb79f61 Fix a bug in the fast Huffman decoder. --- diff --git a/dehuff.c b/dehuff.c index af16b51..c4a65ee 100644 --- a/dehuff.c +++ b/dehuff.c @@ -114,7 +114,7 @@ void read_huffman_tables(huffman_tables_t* dst, input_func_t* input_func, void* for (unsigned elem = prefix_min; elem < prefix_max; ++elem) { assert(tbl->lookup_table_codes[elem] == DEHUF_SLOW_PATH); assert(tbl->lookup_table_length[elem] == DEHUF_SLOW_PATH); - tbl->lookup_table_codes[elem] = k; + tbl->lookup_table_codes[elem] = tbl->codes[k]; tbl->lookup_table_length[elem] = length; } }