authorgravatar for 4678790+dweiller@users.noreply.github.comDominic <4678790+dweiller@users.noreply.github.com> 2023-01-24 13:10:45+11:00
committergravatar for 4678790+dweiller@users.noreply.github.comDominic <4678790+dweiller@users.noreply.github.com> 2023-02-20 09:09:06+11:00
log95953e1ee6a50229e21423aa2ac4e6929b37468a
tree8c2db3e9efa6a4b48b8ab538335a954e21a58d17
parent6b85373875e2a7a8ef9d74e20e8e827dc622a29c

std.compress.zstandard: fix dictionary field size


1 files changed, 2 insertions(+), 2 deletions(-)

lib/std/compress/zstandard/decompress.zig+2-2
......@@ -898,8 +898,8 @@ pub fn decodeZStandardHeader(src: []const u8, consumed_count: ?*usize) !frame.ZS
898898
899899 var dictionary_id: ?u32 = null;
900900 if (descriptor.dictionary_id_flag > 0) {
901 // if flag is 3 we field_size = 4, else field_size = flag
902 const field_size = (@as(u3, 1) << descriptor.dictionary_id_flag) >> 1;
901 // if flag is 3 then field_size = 4, else field_size = flag
902 const field_size = (@as(u4, 1) << descriptor.dictionary_id_flag) >> 1;
903903 dictionary_id = readVarInt(u32, src[bytes_read_count .. bytes_read_count + field_size]);
904904 bytes_read_count += field_size;
905905 }