summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Collet <cyan@fb.com>2018-05-07 01:26:14 (GMT)
committerYann Collet <cyan@fb.com>2018-05-07 01:26:14 (GMT)
commit200b2960d5a5d0fe76d34bb826c236c7c2941563 (patch)
treeb21912c54e910ecdd69c03510eeef8013a00f745
parent24b9c485db34743f83496038d61598d41c3c497e (diff)
downloadlz4-200b2960d5a5d0fe76d34bb826c236c7c2941563.zip
lz4-200b2960d5a5d0fe76d34bb826c236c7c2941563.tar.gz
lz4-200b2960d5a5d0fe76d34bb826c236c7c2941563.tar.bz2
fixed minor conversion warning
-rw-r--r--lib/lz4hc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/lz4hc.c b/lib/lz4hc.c
index 059c4b5..b89983f 100644
--- a/lib/lz4hc.c
+++ b/lib/lz4hc.c
@@ -327,7 +327,8 @@ LZ4HC_InsertAndGetWiderMatch (
if (lookBackLength==0) { /* no back possible */
size_t const maxML = MIN(currentSegmentLength, srcPatternLength);
if ((size_t)longest < maxML) {
- longest = maxML;
+ assert(maxML < 2 GB);
+ longest = (int)maxML;
*matchpos = base + matchIndex; /* virtual pos, relative to ip, to retrieve offset */
*startpos = ip;
}