diff --git a/gen/c/std/flate.c b/gen/c/std/flate.c index 0b88e2d3..d78feb33 100644 --- a/gen/c/std/flate.c +++ b/gen/c/std/flate.c @@ -2170,11 +2170,6 @@ label_0_continue:; v_table_entry_n_bits = (v_table_entry & 15); v_bits >>= v_table_entry_n_bits; v_n_bits -= v_table_entry_n_bits; - if ((v_table_entry >> 31) != 0) { - status = - PUFFS_FLATE__ERROR_INTERNAL_ERROR_INCONSISTENT_HUFFMAN_DECODER_STATE; - goto exit; - } } else { } if ((v_table_entry >> 24) != 64) { @@ -2561,11 +2556,6 @@ static puffs_flate__status puffs_flate__flate_decoder__decode_huffman_slow( v_n_bits += 8; } label_4_break:; - if ((v_table_entry >> 31) != 0) { - status = - PUFFS_FLATE__ERROR_INTERNAL_ERROR_INCONSISTENT_HUFFMAN_DECODER_STATE; - goto exit; - } } if ((v_table_entry >> 24) != 64) { if ((v_table_entry >> 24) == 8) { diff --git a/std/flate/decode_huffman_fast.puffs b/std/flate/decode_huffman_fast.puffs index 46d39aed..f9b7c019 100644 --- a/std/flate/decode_huffman_fast.puffs +++ b/std/flate/decode_huffman_fast.puffs @@ -218,11 +218,6 @@ pri func flate_decoder.decode_huffman_fast?(dst writer1, src reader1)() { table_entry_n_bits = table_entry & 0x0F bits >>= table_entry_n_bits n_bits -= table_entry_n_bits - - // TODO: redundant? - if (table_entry >> 31) != 0 { - return error "internal error: inconsistent Huffman decoder state" - } } else { assert in.src.available() >= 2 } diff --git a/std/flate/decode_huffman_slow.puffs b/std/flate/decode_huffman_slow.puffs index 550ef0c4..22acbf60 100644 --- a/std/flate/decode_huffman_slow.puffs +++ b/std/flate/decode_huffman_slow.puffs @@ -145,11 +145,6 @@ pri func flate_decoder.decode_huffman_slow?(dst writer1, src reader1)() { bits |= (in.src.read_u8?() as u32) << n_bits n_bits += 8 } - - // TODO: redundant? - if (table_entry >> 31) != 0 { - return error "internal error: inconsistent Huffman decoder state" - } } // For H-D, all symbols should be base number + extra bits.