From: Yann Collet Date: Tue, 14 Jan 2025 23:57:05 +0000 (-0800) Subject: restore full equation X-Git-Tag: v1.5.7^2~36^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=87f0a4fbe0a1ffcaab4618f2aa76545e225acf07;p=thirdparty%2Fzstd.git 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. --- diff --git a/lib/compress/zstd_compress.c b/lib/compress/zstd_compress.c index eba2d07dc..e26e78a8f 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 {