Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'CPP/7zip/Compress/Deflate/DeflateEncoder.cpp')
-rwxr-xr-xCPP/7zip/Compress/Deflate/DeflateEncoder.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/CPP/7zip/Compress/Deflate/DeflateEncoder.cpp b/CPP/7zip/Compress/Deflate/DeflateEncoder.cpp
index ac68ff35..2f72fded 100755
--- a/CPP/7zip/Compress/Deflate/DeflateEncoder.cpp
+++ b/CPP/7zip/Compress/Deflate/DeflateEncoder.cpp
@@ -282,10 +282,10 @@ NO_INLINE void CCoder::GetMatches()
{
UInt32 numAvail = Inline_MatchFinder_GetNumAvailableBytes(&_lzInWindow) + 1;
const Byte *pby = Inline_MatchFinder_GetPointerToCurrentPos(&_lzInWindow) - 1;
- UInt32 distance = distanceTmp[numPairs - 1] + 1;
+ const Byte *pby2 = pby - (distanceTmp[numPairs - 1] + 1);
if (numAvail > m_MatchMaxLen)
numAvail = m_MatchMaxLen;
- for (; len < numAvail && pby[len] == pby[(size_t)len - distance]; len++);
+ for (; len < numAvail && pby[len] == pby2[len]; len++);
m_MatchDistances[i - 1] = (UInt16)len;
}
}