summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorYann Collet <cyan@fb.com>2018-09-05 18:25:10 (GMT)
committerYann Collet <cyan@fb.com>2018-09-05 18:25:10 (GMT)
commit30f6f34328733ec4e74c78c06f667810db0417df (patch)
treee3e3bc01eb3e85cef21de88a0d87c80ff4dc81c8 /lib
parent52cce3056227188cedcd36f35a03924425dc14c9 (diff)
downloadlz4-30f6f34328733ec4e74c78c06f667810db0417df.zip
lz4-30f6f34328733ec4e74c78c06f667810db0417df.tar.gz
lz4-30f6f34328733ec4e74c78c06f667810db0417df.tar.bz2
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')
-rw-r--r--lib/lz4hc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/lz4hc.c b/lib/lz4hc.c
index 236dc5b..e913ee7 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 */