From 87f0a4fbe0a1ffcaab4618f2aa76545e225acf07 Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Tue, 14 Jan 2025 15:57:05 -0800 Subject: [PATCH] restore full equation do not solve the equation, even though some members cancel each other, this is done for clarity, we'll let the compiler do the resolution at compile time. --- lib/compress/zstd_compress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/compress/zstd_compress.c b/lib/compress/zstd_compress.c index eba2d07dcf..e26e78a8f7 100644 --- a/lib/compress/zstd_compress.c +++ b/lib/compress/zstd_compress.c @@ -7342,7 +7342,7 @@ size_t ZSTD_convertBlockSequences(ZSTD_CCtx* cctx, DEBUGLOG(5, "long literals length detected at pos %zu", longl-nbSequences); assert(longl <= 2* (nbSequences-1)); cctx->seqStore.longLengthType = ZSTD_llt_literalLength; - cctx->seqStore.longLengthPos = (U32)(longl-nbSequences); + cctx->seqStore.longLengthPos = (U32)(longl-(nbSequences-1)-1); } } } else {