mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Update lz4 to 1.8.3.
This commit is contained in:
@@ -329,6 +329,8 @@ LZ4HC_InsertAndGetWiderMatch (
|
||||
if (lookBackLength==0) { /* no back possible */
|
||||
size_t const maxML = MIN(currentSegmentLength, srcPatternLength);
|
||||
if ((size_t)longest < maxML) {
|
||||
assert(base + matchIndex < ip);
|
||||
if (ip - (base+matchIndex) > MAX_DISTANCE) break;
|
||||
assert(maxML < 2 GB);
|
||||
longest = (int)maxML;
|
||||
*matchpos = base + matchIndex; /* virtual pos, relative to ip, to retrieve offset */
|
||||
@@ -452,6 +454,7 @@ LZ4_FORCE_INLINE int LZ4HC_encodeSequence (
|
||||
*op += length;
|
||||
|
||||
/* Encode Offset */
|
||||
assert( (*ip - match) <= MAX_DISTANCE ); /* note : consider providing offset as a value, rather than as a pointer difference */
|
||||
LZ4_writeLE16(*op, (U16)(*ip-match)); *op += 2;
|
||||
|
||||
/* Encode MatchLength */
|
||||
|
||||
Reference in New Issue
Block a user