| author | |
| committer | |
| log | f872dd03da64e5b53d3a5c7a95344b5b64a7aacb |
| tree | 4b05036b0f163237f166475f5a041aa971345f16 |
| parent | bc7955306e3480fc065277d0b6c5abb6797a27ae |
Without this assert, providing a buffer that's smaller than required results in more cryptic assertion failures later on.1 files changed, 1 insertions(+), 0 deletions(-)
lib/std/compress/zstd/Decompress.zig+1| ... | ... | @@ -92,6 +92,7 @@ const indirect_vtable: Reader.VTable = .{ |
| 92 | 92 | /// |
| 93 | 93 | /// Otherwise, `buffer` has those requirements. |
| 94 | 94 | pub fn init(input: *Reader, buffer: []u8, options: Options) Decompress { |
| 95 | if (buffer.len != 0) assert(buffer.len >= options.window_len + zstd.block_size_max); | |
| 95 | 96 | return .{ |
| 96 | 97 | .input = input, |
| 97 | 98 | .state = .new_frame, |