summaryrefslogtreecommitdiff
path: root/Userland/Libraries
diff options
context:
space:
mode:
authorTim Schumacher <timschumi@gmx.de>2023-03-29 18:15:44 +0200
committerAndreas Kling <kling@serenityos.org>2023-03-30 14:39:31 +0200
commitfe761a4e9b53247e099dcd9c34412c0f2d3b428b (patch)
tree67df26ac8791eca30c6db625380e46be6c6f1470 /Userland/Libraries
parentc020ee8bfa33e27ef438a65d7dc933660eb9be87 (diff)
downloadserenity-fe761a4e9b53247e099dcd9c34412c0f2d3b428b.zip
LibCompress: Use LZMA context from preexisting dictionary
Diffstat (limited to 'Userland/Libraries')
-rw-r--r--Userland/Libraries/LibCompress/Lzma.cpp2
1 files changed, 1 insertions, 1 deletions
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<u16> LzmaDecompressor::decode_symbol_using_reverse_bit_tree(size_t bit_c
ErrorOr<void> 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));
}