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:
authorIgor Pavlov <ipavlov@users.sourceforge.net>2007-10-24 04:00:00 +0400
committerKornel LesiƄski <kornel@geekhood.net>2016-05-28 02:15:55 +0300
commitacd742622d1e0daf50ae815bec4ddb2143bafbf5 (patch)
tree9726a4b8de0935af6c892a2b8d632284f37570c4 /CPP/7zip/Compress/Deflate/DeflateEncoder.cpp
parentb67ffe691bddceb89b47dd09a60203b77a2b72ed (diff)
4.56 beta
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;
}
}