aboutsummaryrefslogtreecommitdiff
path: root/lib/lz4hc.c
diff options
context:
space:
mode:
authorYann Collet <cyan@fb.com>2018-09-05 11:25:10 -0700
committerYann Collet <cyan@fb.com>2018-09-05 11:25:10 -0700
commit30f6f34328733ec4e74c78c06f667810db0417df (patch)
treee3e3bc01eb3e85cef21de88a0d87c80ff4dc81c8 /lib/lz4hc.c
parent52cce3056227188cedcd36f35a03924425dc14c9 (diff)
downloadlz4-30f6f34328733ec4e74c78c06f667810db0417df.tar.gz
removed one assert() condition
which is not correct when using LZ4_HC with dictionary and starting from a low address (<0x10000).
Diffstat (limited to 'lib/lz4hc.c')
-rw-r--r--lib/lz4hc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/lz4hc.c b/lib/lz4hc.c
index 236dc5b3..e913ee7b 100644
--- a/lib/lz4hc.c
+++ b/lib/lz4hc.c
@@ -452,8 +452,7 @@ LZ4_FORCE_INLINE int LZ4HC_encodeSequence (
*op += length;
/* Encode Offset */
- assert(*ip > match);
- assert( (*ip - match) <= MAX_DISTANCE );
+ 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 */