From 18fc98f61929b7832ae43e3072fb20a9adb79f61 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sat, 3 Jan 2009 13:43:29 +0100 Subject: [PATCH 1/1] Fix a bug in the fast Huffman decoder. --- dehuff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } } -- 2.39.2