From fe761a4e9b53247e099dcd9c34412c0f2d3b428b Mon Sep 17 00:00:00 2001 From: Tim Schumacher Date: Wed, 29 Mar 2023 18:15:44 +0200 Subject: LibCompress: Use LZMA context from preexisting dictionary --- Userland/Libraries/LibCompress/Lzma.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Userland/Libraries') diff --git a/Userland/Libraries/LibCompress/Lzma.cpp b/Userland/Libraries/LibCompress/Lzma.cpp index 43a73ffd71..0ff8a38339 100644 --- a/Userland/Libraries/LibCompress/Lzma.cpp +++ b/Userland/Libraries/LibCompress/Lzma.cpp @@ -295,7 +295,7 @@ ErrorOr LzmaDecompressor::decode_symbol_using_reverse_bit_tree(size_t bit_c ErrorOr LzmaDecompressor::decode_literal_to_output_buffer() { u8 previous_byte = 0; - if (m_total_decoded_bytes > 0) { + if (m_dictionary->seekback_limit() > 0) { auto read_bytes = MUST(m_dictionary->read_with_seekback({ &previous_byte, sizeof(previous_byte) }, 1)); VERIFY(read_bytes.size() == sizeof(previous_byte)); } -- cgit v1.2.3