mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
lzma2: fix premature finish
lzma2 Decoder already checks if decoding is finished or not inside the process function, `range_decoder`finish does not mean the decoder has finished, also need to check `ld.rep[0] == 0xFFFF_FFFF`, which was already done inside the proccess function. This fix delete the redundant `isFinish()` check for `range_decoder`.
This commit is contained in:
parent
d51d18c986
commit
35f013db11
1 changed files with 0 additions and 1 deletions
|
|
@ -233,7 +233,6 @@ pub const Decode = struct {
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
if (accum.len >= expected_unpacked_size) break;
|
if (accum.len >= expected_unpacked_size) break;
|
||||||
if (range_decoder.isFinished()) break;
|
|
||||||
switch (try ld.process(reader, allocating, accum, &range_decoder, &n_read)) {
|
switch (try ld.process(reader, allocating, accum, &range_decoder, &n_read)) {
|
||||||
.more => continue,
|
.more => continue,
|
||||||
.finished => break,
|
.finished => break,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue