Skip to content

Commit

Permalink
Fix stale next_code in reset()
Browse files Browse the repository at this point in the history
  • Loading branch information
kornelski committed Jan 19, 2024
1 parent c5bde09 commit 979fd50
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/decode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,7 @@ impl<C: CodeBuffer> Stateful for DecodeState<C> {

fn reset(&mut self) {
self.table.init(self.min_size);
self.next_code = (1 << self.min_size) + 2;
self.buffer.read_mark = 0;
self.buffer.write_mark = 0;
self.last = None;
Expand Down

0 comments on commit 979fd50

Please sign in to comment.