From e290a72d6dee71faf3a90c9678b2f730083666a7 Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Mon, 12 Feb 2024 17:09:10 +0200 Subject: liblzma: Clarify a comment. --- src/liblzma/lzma/lzma_decoder.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/liblzma/lzma') diff --git a/src/liblzma/lzma/lzma_decoder.c b/src/liblzma/lzma/lzma_decoder.c index f7323061..6c9cbe22 100644 --- a/src/liblzma/lzma/lzma_decoder.c +++ b/src/liblzma/lzma/lzma_decoder.c @@ -338,9 +338,12 @@ lzma_decode(void *coder_ptr, lzma_dict *restrict dictptr, // Non-resumable Mode (fast) // /////////////////////////////// - // If there is not enough room for another LZMA symbol - // go to Resumable mode. - if (unlikely(!rc_is_fast_allowed() || dict.pos == dict.limit)) + // Go to Resumable mode (1) if there is not enough input to + // safely decode any possible LZMA symbol or (2) if the + // dictionary is full, which may need special checks that + // are only done in the Resumable mode. + if (unlikely(!rc_is_fast_allowed() + || dict.pos == dict.limit)) goto slow; // Decode the first bit from the next LZMA symbol. -- cgit v1.2.3