std/lzma: fix uncompressed prior decoded length

This commit is contained in:
Nigel Tao committed 2023-12-27 23:40:10 +11:00
1 parent 4dbea68208
commit 1e5cf45090
3 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -233,10 +233,10 @@ pri func decoder.do_transform_io?(dst: base.io_writer, src: base.io_reader) {
while true {
n_copied = args.dst.limited_copy_u32_from_reader!(up_to: length, r: args.src)
this.lzma2_prior_decoded_length ~sat+= n_copied as base.u64
if length <= n_copied {
break
}
this.lzma2_prior_decoded_length ~sat+= n_copied as base.u64
length -= n_copied
if args.dst.length() == 0 {
yield? base."$short write"