fixed minor conversion warning
authorYann Collet <cyan@fb.com>
Mon, 7 May 2018 01:26:14 +0000 (18:26 -0700)
committerYann Collet <cyan@fb.com>
Mon, 7 May 2018 01:26:14 +0000 (18:26 -0700)
lib/lz4hc.c

index 059c4b5..b89983f 100644 (file)
@@ -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;
                                 }